diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-12-19 21:10:26 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-12-19 21:10:26 +0000 |
commit | bd3892f7c15ab72a4aa5d257635b24381467c684 (patch) | |
tree | 60ea8af855c22f0e58a488b0dd73da2c2d75ac75 /apps | |
parent | 94f4ba7edae3e4b8f97bdb81b4701703e7935d3c (diff) |
Free localuser structure when we fail to dial (issue #8612 reported by rizzo)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@48584 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_dial.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 662a2142a..c7fe8762d 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1058,6 +1058,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags cur = rest; if (!cur) chan->hangupcause = cause; + free(tmp); continue; } pbx_builtin_setvar_helper(tmp->chan, "DIALEDPEERNUMBER", numsubst); @@ -1096,6 +1097,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags if (!tmp->chan) { HANDLE_CAUSE(cause, chan); cur = rest; + free(tmp); continue; } } @@ -1163,6 +1165,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags ast_hangup(tmp->chan); tmp->chan = NULL; cur = rest; + free(tmp); continue; } else { senddialevent(chan, tmp->chan); |