diff options
author | Mark Michelson <mmichelson@digium.com> | 2015-01-30 16:47:50 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2015-01-30 16:47:50 +0000 |
commit | 43dd42d8aeee1eff844f605544901016047348e2 (patch) | |
tree | b22def97513a57f91e7d241f9a7adb497d617471 /main/manager.c | |
parent | f7d23dfcc62c5491956570614365eb7ca39a7655 (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
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/manager.c')
-rw-r--r-- | main/manager.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/main/manager.c b/main/manager.c index 36041333f..545d9f80b 100644 --- a/main/manager.c +++ b/main/manager.c @@ -4952,8 +4952,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); @@ -5400,11 +5398,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); |