summaryrefslogtreecommitdiff
path: root/src/include/gnunet_common.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-21 00:54:49 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-21 00:54:49 +0200
commit30361fe0e89a72e2dd248a93824b06d858e4e81a (patch)
tree5cd5b9917bf1fb6899587683ab1680472c29194a /src/include/gnunet_common.h
parent172d6b0c471cd6512b8074d78f59ae9bb8cad9e7 (diff)
make GNUNET_freez default, have GNUNET_free_nz for cases where that does not work
Diffstat (limited to 'src/include/gnunet_common.h')
-rw-r--r--src/include/gnunet_common.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index 78aeb3de7..9e7c77786 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -1284,23 +1284,23 @@ GNUNET_is_zero_ (const void *a,
* @ingroup memory
* Wrapper around free. Frees the memory referred to by ptr.
* Note that it is generally better to free memory that was
- * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free.
+ * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free_nz.
*
* @param ptr location where to free the memory. ptr must have
* been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier.
*/
-#define GNUNET_free(ptr) GNUNET_xfree_ (ptr, __FILE__, __LINE__)
+#define GNUNET_free_nz(ptr) GNUNET_xfree_ (ptr, __FILE__, __LINE__)
/**
* @ingroup memory
* Wrapper around free. Frees the memory referred to by ptr and sets ptr to NULL.
* Note that it is generally better to free memory that was
- * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_freez.
+ * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free.
*
* @param ptr location where to free the memory. ptr must have
* been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier.
*/
-#define GNUNET_freez(ptr) do { \
+#define GNUNET_free(ptr) do { \
GNUNET_xfree_ (ptr, __FILE__, __LINE__); \
ptr = NULL; \
} while (0)