diff options
Diffstat (limited to 'src/include/gnunet_common.h')
-rw-r--r-- | src/include/gnunet_common.h | 8 |
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, | |||
1284 | * @ingroup memory | 1284 | * @ingroup memory |
1285 | * Wrapper around free. Frees the memory referred to by ptr. | 1285 | * Wrapper around free. Frees the memory referred to by ptr. |
1286 | * Note that it is generally better to free memory that was | 1286 | * Note that it is generally better to free memory that was |
1287 | * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free. | 1287 | * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free_nz. |
1288 | * | 1288 | * |
1289 | * @param ptr location where to free the memory. ptr must have | 1289 | * @param ptr location where to free the memory. ptr must have |
1290 | * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. | 1290 | * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. |
1291 | */ | 1291 | */ |
1292 | #define GNUNET_free(ptr) GNUNET_xfree_ (ptr, __FILE__, __LINE__) | 1292 | #define GNUNET_free_nz(ptr) GNUNET_xfree_ (ptr, __FILE__, __LINE__) |
1293 | 1293 | ||
1294 | /** | 1294 | /** |
1295 | * @ingroup memory | 1295 | * @ingroup memory |
1296 | * Wrapper around free. Frees the memory referred to by ptr and sets ptr to NULL. | 1296 | * Wrapper around free. Frees the memory referred to by ptr and sets ptr to NULL. |
1297 | * Note that it is generally better to free memory that was | 1297 | * Note that it is generally better to free memory that was |
1298 | * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_freez. | 1298 | * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free. |
1299 | * | 1299 | * |
1300 | * @param ptr location where to free the memory. ptr must have | 1300 | * @param ptr location where to free the memory. ptr must have |
1301 | * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. | 1301 | * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. |
1302 | */ | 1302 | */ |
1303 | #define GNUNET_freez(ptr) do { \ | 1303 | #define GNUNET_free(ptr) do { \ |
1304 | GNUNET_xfree_ (ptr, __FILE__, __LINE__); \ | 1304 | GNUNET_xfree_ (ptr, __FILE__, __LINE__); \ |
1305 | ptr = NULL; \ | 1305 | ptr = NULL; \ |
1306 | } while (0) | 1306 | } while (0) |