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:
Mathieu Rene
2009-02-23 19:17:24 +00:00
parent 5a92bb1383
commit c4787ffd48
13 changed files with 88 additions and 3 deletions
@@ -532,6 +532,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_reference_load)
module_pool = pool;
memset(&globals, 0, sizeof(globals));
load_config();
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
@@ -565,6 +567,13 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_reference_shutdown)
}
switch_yield(20000);
}
/* Free dynamically allocated strings */
switch_safe_free(globals.dialplan);
switch_safe_free(globals.codec_string);
switch_safe_free(globals.codec_rates_string);
switch_safe_free(globals.ip);
return SWITCH_STATUS_SUCCESS;
}