[asterisk-commits] file: branch 1.2 r45927 - /branches/1.2/cdr/cdr_odbc.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Oct 22 17:25:31 MST 2006


Author: file
Date: Sun Oct 22 19:25:28 2006
New Revision: 45927

URL: http://svn.digium.com/view/asterisk?rev=45927&view=rev
Log:
Don't leak memory mmmk?

Modified:
    branches/1.2/cdr/cdr_odbc.c

Modified: branches/1.2/cdr/cdr_odbc.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/cdr/cdr_odbc.c?rev=45927&r1=45926&r2=45927&view=diff
==============================================================================
--- branches/1.2/cdr/cdr_odbc.c (original)
+++ branches/1.2/cdr/cdr_odbc.c Sun Oct 22 19:25:28 2006
@@ -341,7 +341,6 @@
 		goto out;
 	}
 
-	ast_config_destroy(cfg);
 	if (option_verbose > 2) {
 		ast_verbose( VERBOSE_PREFIX_3 "cdr_odbc: dsn is %s\n",dsn);
 		if (username)
@@ -366,6 +365,8 @@
 		ast_log(LOG_ERROR, "cdr_odbc: Unable to register ODBC CDR handling\n");
 	}
 out:
+	if (cfg)
+		ast_config_destroy(cfg);
 	ast_mutex_unlock(&odbc_lock);
 	return res;
 }



More information about the asterisk-commits mailing list