[svn-commits] tilghman: trunk r359 - in /trunk: ./ res_config_mysql.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Apr 9 13:48:06 MST 2007


Author: tilghman
Date: Mon Apr  9 15:48:05 2007
New Revision: 359

URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=359
Log:
Merged revisions 358 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-addons/branches/1.4

................
r358 | tilghman | 2007-04-09 15:44:51 -0500 (Mon, 09 Apr 2007) | 10 lines

Merged revisions 357 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-addons/branches/1.2

........
r357 | tilghman | 2007-04-09 15:39:45 -0500 (Mon, 09 Apr 2007) | 2 lines

Fix memory leaks, and some unnecessary closes

........

................

Modified:
    trunk/   (props changed)
    trunk/res_config_mysql.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-1.4-merged (original)
+++ branch-1.4-merged Mon Apr  9 15:48:05 2007
@@ -1,1 +1,1 @@
-/branches/1.4:1-299,308,310,317,319,329,342,348
+/branches/1.4:1-299,308,310,317,319,329,342,348,358

Modified: trunk/res_config_mysql.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/res_config_mysql.c?view=diff&rev=359&r1=358&r2=359
==============================================================================
--- trunk/res_config_mysql.c (original)
+++ trunk/res_config_mysql.c Mon Apr  9 15:48:05 2007
@@ -106,7 +106,6 @@
 	newval = va_arg(ap, const char *);
 	if (!newparam || !newval)  {
 		ast_log(LOG_WARNING, "MySQL RealTime: Realtime retrieval requires at least 1 parameter and 1 value to search on.\n");
-		mysql_close(&mysql);
 		return NULL;
 	}
 
@@ -222,7 +221,7 @@
 	newval = va_arg(ap, const char *);
 	if (!newparam || !newval)  {
 		ast_log(LOG_WARNING, "MySQL RealTime: Realtime retrieval requires at least 1 parameter and 1 value to search on.\n");
-		mysql_close(&mysql);
+		ast_config_destroy(cfg);
 		return NULL;
 	}
 
@@ -270,6 +269,7 @@
 		ast_log(LOG_DEBUG, "MySQL RealTime: Query: %s\n", sql);
 		ast_log(LOG_DEBUG, "MySQL RealTime: Query Failed because: %s\n", mysql_error(&mysql));
 		ast_mutex_unlock(&mysql_lock);
+		ast_config_destroy(cfg);
 		return NULL;
 	}
 
@@ -327,7 +327,6 @@
 	newval = va_arg(ap, const char *);
 	if (!newparam || !newval)  {
 		ast_log(LOG_WARNING, "MySQL RealTime: Realtime retrieval requires at least 1 parameter and 1 value to search on.\n");
-		mysql_close(&mysql);
                return -1;
 	}
 



More information about the svn-commits mailing list