gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: -add NULL check


From: gnunet
Subject: [gnunet] branch master updated: -add NULL check
Date: Sat, 15 May 2021 19:55:29 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new b0c9eac44 -add NULL check
b0c9eac44 is described below

commit b0c9eac44e7f4b1325c91108394c269b2c491fb7
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat May 15 19:52:58 2021 +0200

    -add NULL check
---
 src/util/common_allocation.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]