[Freeswitch-svn] [commit] r9240 - freeswitch/trunk/src

Freeswitch SVN mikej at freeswitch.org
Mon Aug 11 13:47:07 EDT 2008


Author: mikej
Date: Mon Aug 11 13:47:06 2008
New Revision: 9240

Modified:
   freeswitch/trunk/src/switch_console.c

Log:
fix a little leak reported by skopii

Modified: freeswitch/trunk/src/switch_console.c
==============================================================================
--- freeswitch/trunk/src/switch_console.c	(original)
+++ freeswitch/trunk/src/switch_console.c	Mon Aug 11 13:47:06 2008
@@ -165,7 +165,7 @@
 {
 	char *errmsg = NULL;
 	char *r = NULL;
-	char *sql;
+	char *sql = NULL;
 	char *exp = NULL;
 	switch_core_db_t *db = switch_core_db_handle();
 	int full = 0;
@@ -179,6 +179,8 @@
 		free(errmsg);
 	}
 
+	switch_safe_free(sql);
+
 	if (!r) {
 		sql = switch_mprintf("select command from aliases where alias='%q %q'", cmd, arg);
 
@@ -193,6 +195,7 @@
 		}
 	}
 
+	switch_safe_free(sql);
 
 	if (r) {
 		if (arg && !full) {



More information about the Freeswitch-svn mailing list