diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-14 22:38:06 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-14 22:38:06 +0000 |
commit | 6c7d8c95dfe56152ca00cde4c7c59496b513af6a (patch) | |
tree | 96325674713833036b2bd7758905df5ccb47ca65 /pbx | |
parent | d12237922aaa9e2273879e19453efd59a04d2503 (diff) |
Add additional memory debugging to several core APIs, and fix several memory
leaks found with these changes.
(Closes issue #13505, closes issue #13543)
Reported by: mav3rick, triccyx
Patches:
20081001__bug13505.diff.txt uploaded by Corydon76 (license 14)
Tested by: mav3rick, triccyx
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@149199 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r-- | pbx/pbx_spool.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c index 37ff0edad..26d38dfe5 100644 --- a/pbx/pbx_spool.c +++ b/pbx/pbx_spool.c @@ -101,6 +101,9 @@ static void init_outgoing(struct outgoing *o) static void free_outgoing(struct outgoing *o) { + if (o->vars) { + ast_variables_destroy(o->vars); + } ast_free(o); } @@ -324,9 +327,11 @@ static void *attempt_thread(void *data) if (!ast_strlen_zero(o->app)) { ast_verb(3, "Attempting call on %s/%s for application %s(%s) (Retry %d)\n", o->tech, o->dest, o->app, o->data, o->retries); res = ast_pbx_outgoing_app(o->tech, o->format, o->dest, o->waittime * 1000, o->app, o->data, &reason, 2 /* wait to finish */, o->cid_num, o->cid_name, o->vars, o->account, NULL); + o->vars = NULL; } else { ast_verb(3, "Attempting call on %s/%s for %s@%s:%d (Retry %d)\n", o->tech, o->dest, o->exten, o->context,o->priority, o->retries); res = ast_pbx_outgoing_exten(o->tech, o->format, o->dest, o->waittime * 1000, o->context, o->exten, o->priority, &reason, 2 /* wait to finish */, o->cid_num, o->cid_name, o->vars, o->account, NULL); + o->vars = NULL; } if (res) { ast_log(LOG_NOTICE, "Call failed to go through, reason (%d) %s\n", reason, ast_channel_reason2str(reason)); |