diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-09-17 18:57:56 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-09-17 18:57:56 +0000 |
commit | eb015e768e971e62ff2033817a67c3b6fc9e51f3 (patch) | |
tree | 501e2d1eb1bf1530614bd70aa8087849cc1da650 /include | |
parent | a8a0589de9d71d5e95b7acb9b4b1a5cecd9448b0 (diff) |
Make the MALLOC_DEBUG output for free() useful again. After changing calls to
free to be ast_free, astmm said all calls to free were coming from utils.h
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82628 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/utils.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h index d87ea0339..efde93d59 100644 --- a/include/asterisk/utils.h +++ b/include/asterisk/utils.h @@ -408,20 +408,22 @@ char *ast_process_quotes_and_slashes(char *start, char find, char replace_with); long int ast_random(void); +#define ast_free free + /*! * \brief free() wrapper * - * ast_free should be used when a function pointer for free() needs to be passed + * ast_free_ptr should be used when a function pointer for free() needs to be passed * as the argument to a function. Otherwise, astmm will cause seg faults. */ #ifdef __AST_DEBUG_MALLOC -static void ast_free(void *ptr) attribute_unused; -static void ast_free(void *ptr) +static void ast_free_ptr(void *ptr) attribute_unused; +static void ast_free_ptr(void *ptr) { - free(ptr); + ast_free(ptr); } #else -#define ast_free free +#define ast_free_ptr ast_free #endif #ifndef __AST_DEBUG_MALLOC |