mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
Fix a variety of memory leaks
This patch addresses the following memory/ref counting leaks: * main/devicestate.c - unsubscribe and join our devicestate message subscription * main/cel.c - clean up the datastore and config objects on exist * main/parking.c - cleanup memory leak of retriever snapshot on message payload destruction * res/parking/parking_bridge.c - cleanup memory leak of retrieve snapshot on message payload destruction * main/presencestate.c - unsubscribe and join the caching topic on exit * manager.c - properly unregister the manager action "BlindTransfer" * sorcery.c - shutdown the threadpool on exit and dispose of any wizards (issue ASTERISK-21906) Reported by: John Hardin patches: cel.patch uploaded by jhardin (license #6512) devicestate.patch uploaded by jhardin (license #6512) manager.patch uploaded by jardin (license #6512) presencestate.patch uploaded by jhardin (license #6512) retriever-channel-snapshot.patch uploaded by jhardin (license #6512) sorcery.patch uploaded by jhardin (license #6512) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
10
main/cel.c
10
main/cel.c
@@ -1415,6 +1415,8 @@ static void cel_dial_cb(void *data, struct stasis_subscription *sub,
|
||||
|
||||
static void ast_cel_engine_term(void)
|
||||
{
|
||||
aco_info_destroy(&cel_cfg_info);
|
||||
ao2_global_obj_release(cel_configs);
|
||||
stasis_message_router_unsubscribe_and_join(cel_state_router);
|
||||
cel_state_router = NULL;
|
||||
ao2_cleanup(cel_state_topic);
|
||||
@@ -1422,11 +1424,13 @@ static void ast_cel_engine_term(void)
|
||||
cel_channel_forwarder = stasis_unsubscribe_and_join(cel_channel_forwarder);
|
||||
cel_bridge_forwarder = stasis_unsubscribe_and_join(cel_bridge_forwarder);
|
||||
cel_parking_forwarder = stasis_unsubscribe_and_join(cel_parking_forwarder);
|
||||
ao2_cleanup(linkedids);
|
||||
linkedids = NULL;
|
||||
ast_cli_unregister(&cli_status);
|
||||
ao2_cleanup(bridge_primaries);
|
||||
bridge_primaries = NULL;
|
||||
ast_cli_unregister(&cli_status);
|
||||
ao2_cleanup(cel_dialstatus_store);
|
||||
cel_dialstatus_store = NULL;
|
||||
ao2_cleanup(linkedids);
|
||||
linkedids = NULL;
|
||||
}
|
||||
|
||||
int ast_cel_engine_init(void)
|
||||
|
Reference in New Issue
Block a user