[Freeswitch-svn] [commit] r12852 - freeswitch/trunk/src/mod/loggers/mod_syslog

FreeSWITCH SVN mikej at freeswitch.org
Tue Mar 31 10:13:16 PDT 2009


Author: mikej
Date: Tue Mar 31 12:13:16 2009
New Revision: 12852

Log:
fix string scope on globals (LOGGER-1)

Modified:
   freeswitch/trunk/src/mod/loggers/mod_syslog/mod_syslog.c

Modified: freeswitch/trunk/src/mod/loggers/mod_syslog/mod_syslog.c
==============================================================================
--- freeswitch/trunk/src/mod/loggers/mod_syslog/mod_syslog.c	(original)
+++ freeswitch/trunk/src/mod/loggers/mod_syslog/mod_syslog.c	Tue Mar 31 12:13:16 2009
@@ -164,15 +164,16 @@
 	setlogmask(LOG_UPTO(LOG_DEBUG));
 	switch_log_bind_logger(mod_syslog_logger, log_level, SWITCH_FALSE);
 
-	switch_safe_free(globals.ident);
-	switch_safe_free(globals.format);
-
 	return SWITCH_STATUS_SUCCESS;
 }
 
 SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_syslog_shutdown)
 {
 	closelog();
+
+	switch_safe_free(globals.ident);
+	switch_safe_free(globals.format);
+
 	switch_log_unbind_logger(mod_syslog_logger);
 
 	return SWITCH_STATUS_SUCCESS;



More information about the Freeswitch-svn mailing list