mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 06:48:25 +00:00
Free localuser structure when we fail to dial (issue #8612 reported by rizzo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1058,6 +1058,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
|
|||||||
cur = rest;
|
cur = rest;
|
||||||
if (!cur)
|
if (!cur)
|
||||||
chan->hangupcause = cause;
|
chan->hangupcause = cause;
|
||||||
|
free(tmp);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
pbx_builtin_setvar_helper(tmp->chan, "DIALEDPEERNUMBER", numsubst);
|
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) {
|
if (!tmp->chan) {
|
||||||
HANDLE_CAUSE(cause, chan);
|
HANDLE_CAUSE(cause, chan);
|
||||||
cur = rest;
|
cur = rest;
|
||||||
|
free(tmp);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1163,6 +1165,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
|
|||||||
ast_hangup(tmp->chan);
|
ast_hangup(tmp->chan);
|
||||||
tmp->chan = NULL;
|
tmp->chan = NULL;
|
||||||
cur = rest;
|
cur = rest;
|
||||||
|
free(tmp);
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
senddialevent(chan, tmp->chan);
|
senddialevent(chan, tmp->chan);
|
||||||
|
|||||||
Reference in New Issue
Block a user