diff options
author | Kevin Harwell <kharwell@digium.com> | 2013-08-29 21:37:29 +0000 |
---|---|---|
committer | Kevin Harwell <kharwell@digium.com> | 2013-08-29 21:37:29 +0000 |
commit | e1cfc18a78195cce9504b61f0aaeb4b61582fa15 (patch) | |
tree | fa20c92a1aa3ae73d33d8394a9e5dc723837dff5 /main/cdr.c | |
parent | 449afdd9e8d38a5a479cc0320091fd315d2b4d4a (diff) |
Memory leaks fix
(closes ASTERISK-22376)
Reported by: John Hardin
Patches:
memleak.patch uploaded by jhardin (license 6512)
memleak2.patch uploaded by jhardin (license 6512)
........
Merged revisions 397946 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/cdr.c')
-rw-r--r-- | main/cdr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/cdr.c b/main/cdr.c index 53336c85e..967dfaad4 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -1799,7 +1799,7 @@ static int finalized_state_process_party_a(struct cdr_object *cdr, struct ast_ch static void handle_dial_message(void *data, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *message) { RAII_VAR(struct module_config *, mod_cfg, ao2_global_obj_ref(module_configs), ao2_cleanup); - struct cdr_object *cdr; + RAII_VAR(struct cdr_object *, cdr, NULL, ao2_cleanup); struct ast_multi_channel_blob *payload = stasis_message_data(message); struct ast_channel_snapshot *caller; struct ast_channel_snapshot *peer; @@ -3967,6 +3967,8 @@ static void cdr_engine_cleanup(void) bridge_subscription = stasis_unsubscribe_and_join(bridge_subscription); parking_subscription = stasis_unsubscribe_and_join(parking_subscription); stasis_message_router_unsubscribe_and_join(stasis_router); + ao2_cleanup(cdr_topic); + cdr_topic = NULL; } static void cdr_engine_shutdown(void) |