summaryrefslogtreecommitdiff
path: root/main/manager.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2015-01-30 16:49:59 +0000
committerMark Michelson <mmichelson@digium.com>2015-01-30 16:49:59 +0000
commitbd0bdf1e41c52afb6dbf262d60a8ed02d2110fcd (patch)
tree8f6b06aedf21985ef4c0b3ca1b21ea7e56319bfa /main/manager.c
parent388d691f34d7cfcb77130965bf8709eee4b692c1 (diff)
Fix some memory leaks.
These memory leaks were found and fixed by John Hardin. I'm just committing them for him. ASTERISK-24736 #close Reported by Mark Michelson Review: https://reviewboard.asterisk.org/r/4389 ........ Merged revisions 431468 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/manager.c')
-rw-r--r--main/manager.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/main/manager.c b/main/manager.c
index 783a704de..aa8a5c38c 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -4970,8 +4970,6 @@ static void *fast_originate(void *data)
S_OR(in->cid_name, NULL),
in->vars, in->account, &chan, in->early_media, &assignedids);
}
- /* Any vars memory was passed to the ast_pbx_outgoing_xxx() calls. */
- in->vars = NULL;
if (!chan) {
snprintf(requested_channel, AST_CHANNEL_NAME, "%s/%s", in->tech, in->data);
@@ -5418,11 +5416,11 @@ static int action_originate(struct mansession *s, const struct message *m)
}
} else if (!ast_strlen_zero(app)) {
res = ast_pbx_outgoing_app(tech, cap, data, to, app, appdata, &reason, 1, l, n, vars, account, NULL, assignedids.uniqueid ? &assignedids : NULL);
- /* Any vars memory was passed to ast_pbx_outgoing_app(). */
+ ast_variables_destroy(vars);
} else {
if (exten && context && pi) {
res = ast_pbx_outgoing_exten(tech, cap, data, to, context, exten, pi, &reason, 1, l, n, vars, account, NULL, bridge_early, assignedids.uniqueid ? &assignedids : NULL);
- /* Any vars memory was passed to ast_pbx_outgoing_exten(). */
+ ast_variables_destroy(vars);
} else {
astman_send_error(s, m, "Originate with 'Exten' requires 'Context' and 'Priority'");
ast_variables_destroy(vars);