aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util/common_allocation.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c
index 215df55d4..308488131 100644
--- a/src/util/common_allocation.c
+++ b/src/util/common_allocation.c
@@ -327,8 +327,12 @@ GNUNET_xrealloc_ (void *ptr, size_t n, const char *filename, int linenumber)
327 * @param linenumber where in the code was the call to GNUNET_free() 327 * @param linenumber where in the code was the call to GNUNET_free()
328 */ 328 */
329void 329void
330GNUNET_xfree_ (void *ptr, const char *filename, int linenumber) 330GNUNET_xfree_ (void *ptr,
331 const char *filename,
332 int linenumber)
331{ 333{
334 if (NULL == ptr)
335 return;
332#ifdef W32_MEM_LIMIT 336#ifdef W32_MEM_LIMIT
333 ptr = &((size_t *) ptr)[-1]; 337 ptr = &((size_t *) ptr)[-1];
334 mem_used -= *((size_t *) ptr); 338 mem_used -= *((size_t *) ptr);