Diff
Modified: freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c (17359 => 17360)
--- freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c 2010-04-21 14:53:26 UTC (rev 17359)
+++ freeswitch/trunk/src/mod/endpoints/mod_loopback/mod_loopback.c 2010-04-21 15:11:13 UTC (rev 17360)
@@ -44,8 +44,6 @@
static switch_endpoint_interface_t *loopback_endpoint_interface = NULL;
-static switch_memory_pool_t *module_pool = NULL;
-
typedef enum {
TFLAG_LINKED = (1 << 0),
TFLAG_OUTBOUND = (1 << 1),
@@ -887,10 +885,6 @@
SWITCH_MODULE_LOAD_FUNCTION(mod_loopback_load)
{
- if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
- return SWITCH_STATUS_TERM;
- }
memset(&globals, 0, sizeof(globals));
Modified: freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c (17359 => 17360)
--- freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c 2010-04-21 14:53:26 UTC (rev 17359)
+++ freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c 2010-04-21 15:11:13 UTC (rev 17360)
@@ -36,7 +36,6 @@
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sndfile_shutdown);
SWITCH_MODULE_DEFINITION(mod_sndfile, mod_sndfile_load, mod_sndfile_shutdown, NULL);
-static switch_memory_pool_t *module_pool = NULL;
static struct {
switch_hash_t *format_hash;
@@ -415,13 +414,8 @@
{
switch_file_interface_t *file_interface;
- if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
- return SWITCH_STATUS_TERM;
- }
+ switch_core_hash_init(&globals.format_hash, pool);
- switch_core_hash_init(&globals.format_hash, module_pool);
-
if (setup_formats() != SWITCH_STATUS_SUCCESS) {
return SWITCH_STATUS_FALSE;
}
@@ -447,6 +441,7 @@
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sndfile_shutdown)
{
switch_core_hash_destroy(&globals.format_hash);
+
return SWITCH_STATUS_SUCCESS;
}
Modified: freeswitch/trunk/src/mod/loggers/mod_logfile/mod_logfile.c (17359 => 17360)
--- freeswitch/trunk/src/mod/loggers/mod_logfile/mod_logfile.c 2010-04-21 14:53:26 UTC (rev 17359)
+++ freeswitch/trunk/src/mod/loggers/mod_logfile/mod_logfile.c 2010-04-21 15:11:13 UTC (rev 17360)
@@ -398,9 +398,11 @@
if ((profile = (logfile_profile_t *) val)) {
switch_file_close(profile->log_afd);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Closing %s\n", profile->logfile);
+ switch_safe_free(profile->logfile);
}
}
+ switch_core_hash_destroy(&profile_hash);
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/switch.c (17359 => 17360)
--- freeswitch/trunk/src/switch.c 2010-04-21 14:53:26 UTC (rev 17359)
+++ freeswitch/trunk/src/switch.c 2010-04-21 15:11:13 UTC (rev 17360)
@@ -791,6 +791,7 @@
destroy_status = switch_core_destroy();
switch_file_close(fd);
+ apr_pool_destroy(pool);
if (unlink(pid_path) != 0) {
fprintf(stderr, "Failed to delete pid file [%s]\n", pid_path);
Modified: freeswitch/trunk/src/switch_core.c (17359 => 17360)
--- freeswitch/trunk/src/switch_core.c 2010-04-21 14:53:26 UTC (rev 17359)
+++ freeswitch/trunk/src/switch_core.c 2010-04-21 15:11:13 UTC (rev 17360)
@@ -1867,13 +1867,23 @@
switch_safe_free(SWITCH_GLOBAL_dirs.script_dir);
switch_safe_free(SWITCH_GLOBAL_dirs.htdocs_dir);
switch_safe_free(SWITCH_GLOBAL_dirs.grammar_dir);
+ switch_safe_free(SWITCH_GLOBAL_dirs.storage_dir);
switch_safe_free(SWITCH_GLOBAL_dirs.recordings_dir);
switch_safe_free(SWITCH_GLOBAL_dirs.sounds_dir);
+ switch_safe_free(SWITCH_GLOBAL_dirs.run_dir);
switch_safe_free(SWITCH_GLOBAL_dirs.temp_dir);
switch_core_hash_destroy(&runtime.global_vars);
switch_core_hash_destroy(&runtime.mime_types);
+ if (IP_LIST.hash) {
+ switch_core_hash_destroy(&IP_LIST.hash);
+ }
+
+ if (IP_LIST.pool) {
+ switch_core_destroy_memory_pool(&IP_LIST.pool);
+ }
+
if (runtime.memory_pool) {
apr_pool_destroy(runtime.memory_pool);
apr_terminate();
Modified: freeswitch/trunk/src/switch_loadable_module.c (17359 => 17360)
--- freeswitch/trunk/src/switch_loadable_module.c 2010-04-21 14:53:26 UTC (rev 17359)
+++ freeswitch/trunk/src/switch_loadable_module.c 2010-04-21 15:11:13 UTC (rev 17360)
@@ -788,7 +788,7 @@
switch_loadable_module_interface_t *module_interface = NULL;
char *derr = NULL;
const char *err = NULL;
- switch_memory_pool_t *pool;
+ switch_memory_pool_t *pool = NULL;
switch_bool_t load_global = global;
switch_assert(path != NULL);
@@ -1349,6 +1349,7 @@
switch_core_hash_destroy(&loadable_modules.management_hash);
switch_core_hash_destroy(&loadable_modules.dialplan_hash);
+ switch_core_destroy_memory_pool(&loadable_modules.pool);
}
SWITCH_DECLARE(switch_endpoint_interface_t *) switch_loadable_module_get_endpoint_interface(const char *name)
Modified: freeswitch/trunk/src/switch_time.c (17359 => 17360)
--- freeswitch/trunk/src/switch_time.c 2010-04-21 14:53:26 UTC (rev 17359)
+++ freeswitch/trunk/src/switch_time.c 2010-04-21 15:11:13 UTC (rev 17360)
@@ -1064,6 +1064,10 @@
switch_core_destroy_memory_pool(&TIMEZONES_LIST.pool);
}
+ if (NODE) {
+ switch_event_unbind(&NODE);
+ }
+
return SWITCH_STATUS_SUCCESS;
}