The main problem here was that cstdlib was undefining free thereby causing the
proper debug macros to not be used. ast_h323.cxx has been changed to call
ast_free instead to avoid the issue.
A few other issues were addressed:
- There were a few instances of functions improperly passing ast_free instead
of ast_free_ptr.
- Some clean up was done to avoid the debug macros intentionally being redefined.
(copied below from Kevin's commit, appreciate the help)
- disable astmm.h from doing anything when STANDALONE is defined, which is used
by the tools in the utils/ directory that use parts of Asterisk header files in
hackish ways; also ensure that utils/extconf.c and utils/conf2ael.c are
compiled with STANDALONE defined.
(closes issue #13593)
Reported by: pj
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
ast_log(LOG_ERROR,"Memory Allocation Failure in function %s at line %d of %s\n",func,lineno,file);
/*!
@ -1239,20 +1146,6 @@ int _ast_vasprintf(char **ret, const char *file, int lineno, const char *func, c
}
)
#else
/* If astmm is in use, let it handle these. Otherwise, it will report that
allallocationsarecomingfromthisheaderfile*/
#define ast_malloc(a) malloc(a)
#define ast_calloc(a,b) calloc(a,b)
#define ast_realloc(a,b) realloc(a,b)
#define ast_strdup(a) strdup(a)
#define ast_strndup(a,b) strndup(a,b)
#define ast_vasprintf(a,b,c) vasprintf(a,b,c)
#endif /* AST_DEBUG_MALLOC */
#if !defined(ast_strdupa) && defined(__GNUC__)
/*!
\briefduplicateastringinmemoryfromthestack
@ -6092,7 +5985,7 @@ static int pbx_load_config(const char *config_file)
lastpri=ipri;
if(!ast_opt_dont_warn&&!strcmp(realext,"_."))
ast_log(LOG_WARNING,"The use of '_.' for an extension is strongly discouraged and can have unexpected behavior. Please use '_X.' instead at line %d\n",v->lineno);