diff options
author | Corey Farrell <git@cfware.com> | 2014-07-13 16:48:48 +0000 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2014-07-13 16:48:48 +0000 |
commit | f4a30ad32e7e7ce12ef843fa6cdd90624c65ca79 (patch) | |
tree | 7590e7465aa049edfeaf1af62513725688ffc5a5 /main | |
parent | 6461d90d8a1568b5f6709a9556690e1d6a9110ae (diff) |
Fix minor reference leaks in app_skel and TEST_FRAMEWORK
* Cleanup games object in app_skel.
* Cleanup stasis subscription to TEST_FRAMEWORK in manager.c (12+).
Review: https://reviewboard.asterisk.org/r/3757/
........
Merged revisions 418465 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 418466 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/manager.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/main/manager.c b/main/manager.c index 31d970942..63e08631a 100644 --- a/main/manager.c +++ b/main/manager.c @@ -1150,6 +1150,10 @@ static struct stasis_forward *rtp_topic_forwarder; /*! \brief The \ref stasis_subscription for forwarding the Security topic to the AMI topic */ static struct stasis_forward *security_topic_forwarder; +#ifdef TEST_FRAMEWORK +struct stasis_subscription *test_suite_sub; +#endif + #define MGR_SHOW_TERMINAL_WIDTH 80 #define MAX_VARS 128 @@ -7987,6 +7991,10 @@ static void manager_shutdown(void) ao2_t_global_obj_release(event_docs, "Dispose of event_docs"); #endif +#ifdef TEST_FRAMEWORK + stasis_unsubscribe(test_suite_sub); +#endif + if (stasis_router) { stasis_message_router_unsubscribe_and_join(stasis_router); stasis_router = NULL; @@ -8179,7 +8187,7 @@ static int __init_manager(int reload, int by_external_config) ast_manager_register_xml_core("BlindTransfer", EVENT_FLAG_CALL, action_blind_transfer); #ifdef TEST_FRAMEWORK - stasis_subscribe(ast_test_suite_topic(), test_suite_event_cb, NULL); + test_suite_sub = stasis_subscribe(ast_test_suite_topic(), test_suite_event_cb, NULL); #endif ast_cli_register_multiple(cli_manager, ARRAY_LEN(cli_manager)); |