aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/app_dial.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 8d3c9e3b4..0c13db294 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);