mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-11 03:57:14 +00:00
Leaking on unload is strictly forbidden
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12251 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
5a92bb1383
commit
c4787ffd48
13 files changed
+88
-3
No files matched your search
@@ -1296,7 +1296,9 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_erlang_event_load)
|
||||
{
|
||||
switch_application_interface_t *app_interface;
|
||||
switch_api_interface_t *api_interface;
|
||||
|
||||
|
||||
memset(&prefs, 0, sizeof(prefs));
|
||||
|
||||
switch_mutex_init(&globals.listener_mutex, SWITCH_MUTEX_NESTED, pool);
|
||||
|
||||
/* intialize the unique reference stuff */
|
||||
@@ -1517,6 +1519,10 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_erlang_event_shutdown)
|
||||
|
||||
switch_sleep(1500000); /* sleep for 1.5 seconds */
|
||||
|
||||
switch_safe_free(prefs.ip);
|
||||
switch_safe_free(prefs.cookie);
|
||||
switch_safe_free(prefs.nodename);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -267,6 +267,9 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_event_multicast_shutdown)
|
||||
|
||||
switch_core_hash_destroy(&globals.event_hash);
|
||||
|
||||
switch_safe_free(globals.address);
|
||||
switch_safe_free(globals.bindings);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -471,6 +471,9 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_event_socket_shutdown)
|
||||
|
||||
switch_event_unbind(&globals.node);
|
||||
|
||||
switch_safe_free(prefs.ip);
|
||||
switch_safe_free(prefs.password);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -933,6 +936,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_event_socket_load)
|
||||
switch_application_interface_t *app_interface;
|
||||
switch_api_interface_t *api_interface;
|
||||
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
|
||||
switch_mutex_init(&globals.listener_mutex, SWITCH_MUTEX_NESTED, pool);
|
||||
|
||||
memset(&listen_list, 0, sizeof(listen_list));
|
||||
|
||||
Reference in new issue
Block a user