From: Joshua Colp Date: Tue, 19 Dec 2006 21:12:07 +0000 (+0000) Subject: Merged revisions 48584 via svnmerge from X-Git-Tag: 1.4.0~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8d7bdfc6075696e99635243280ead1bd24f0fd68;p=thirdparty%2Fasterisk.git Merged revisions 48584 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r48584 | file | 2006-12-19 16:10:26 -0500 (Tue, 19 Dec 2006) | 2 lines Free localuser structure when we fail to dial (issue #8612 reported by rizzo) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48585 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_dial.c b/apps/app_dial.c index 8d3c9e3b43..0c13db2947 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1082,6 +1082,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags HANDLE_CAUSE(cause, chan); if (!rest) /* we are on the last destination */ chan->hangupcause = cause; + free(tmp); continue; } pbx_builtin_setvar_helper(tmp->chan, "DIALEDPEERNUMBER", numsubst); @@ -1125,6 +1126,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags } if (!tmp->chan) { HANDLE_CAUSE(cause, chan); + free(tmp); continue; } } @@ -1194,6 +1196,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags ast_verbose(VERBOSE_PREFIX_3 "Couldn't call %s\n", numsubst); ast_hangup(tmp->chan); tmp->chan = NULL; + free(tmp); continue; } else { senddialevent(chan, tmp->chan);