summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2021-05-15 20:09:36 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2021-05-15 20:09:36 +0200
commit9af213e65c0c4d8daac0e6509c931c6f880ca03c (patch)
treec900ff9f6a1de89c2ac87378e8225442547d0ba4
parent706c38e6ad7ee354e83f7f08e3e0c9584ce15631 (diff)
parentb0c9eac44e7f4b1325c91108394c269b2c491fb7 (diff)
Merge branch 'master' of ssh://gnunet.org/gnunet
-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)
* @param linenumber where in the code was the call to GNUNET_free()
*/
void
-GNUNET_xfree_ (void *ptr, const char *filename, int linenumber)
+GNUNET_xfree_ (void *ptr,
+ const char *filename,
+ int linenumber)
{
+ if (NULL == ptr)
+ return;
#ifdef W32_MEM_LIMIT
ptr = &((size_t *) ptr)[-1];
mem_used -= *((size_t *) ptr);