[asterisk-commits] tilghman: trunk r131681 - /trunk/res/res_config_sqlite.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 17 10:45:26 CDT 2008


Author: tilghman
Date: Thu Jul 17 10:45:25 2008
New Revision: 131681

URL: http://svn.digium.com/view/asterisk?view=rev&rev=131681
Log:
Fix memory leak.
(Closes issue #13096)
Reported by gknispel_proformatique

Modified:
    trunk/res/res_config_sqlite.c

Modified: trunk/res/res_config_sqlite.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_config_sqlite.c?view=diff&rev=131681&r1=131680&r2=131681
==============================================================================
--- trunk/res/res_config_sqlite.c (original)
+++ trunk/res/res_config_sqlite.c Thu Jul 17 10:45:25 2008
@@ -1091,6 +1091,7 @@
 
 	if (!(tmp_str = sqlite_mprintf("%s ORDER BY %q;", query, initfield))) {
 		ast_log(LOG_WARNING, "Unable to reallocate SQL query\n");
+		sqlite_freemem(query);
 		ast_config_destroy(cfg);
 		ast_free(initfield);
 		return NULL;




More information about the asterisk-commits mailing list