dect
/
asterisk
Archived
13
0
Fork 0

Merged revisions 38328 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38328 | russell | 2006-07-27 00:25:41 -0400 (Thu, 27 Jul 2006) | 4 lines

Fix crash when using the "regexten" option with MALLOC_DEBUG enabled.  This was
not reported in the bug tracker but the same bug has been demonstrated in other
places in the code.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38329 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
russell 2006-07-27 04:28:09 +00:00
parent b8fa8202c2
commit 0fdbca7bd0
1 changed files with 10 additions and 1 deletions

View File

@ -702,6 +702,15 @@ static AST_LIST_HEAD_STATIC(dynamic_list, iax2_thread);
static void *iax2_process_thread(void *data);
#ifdef __AST_DEBUG_MALLOC
static void FREE(void *ptr)
{
free(ptr);
}
#else
#define FREE free
#endif
static void signal_condition(ast_mutex_t *lock, ast_cond_t *cond)
{
ast_mutex_lock(lock);
@ -5441,7 +5450,7 @@ static void register_peer_exten(struct iax2_peer *peer, int onoff)
if (onoff) {
if (!ast_exists_extension(NULL, regcontext, ext, 1, NULL))
ast_add_extension(regcontext, 1, ext, 1, NULL, NULL,
"Noop", ast_strdup(peer->name), free, "IAX2");
"Noop", ast_strdup(peer->name), FREE, "IAX2");
} else
ast_context_remove_extension(regcontext, ext, 1, NULL);
}