[asterisk-commits] mjordan: branch 1.8 r372158 - /branches/1.8/cel/cel_pgsql.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 4 21:16:22 CDT 2012
Author: mjordan
Date: Tue Sep 4 21:16:17 2012
New Revision: 372158
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=372158
Log:
Fix memory leak when CEL is successfully written to PostgreSQL database
PQClear is not called when the result object of a call to PQExec has a
status of PGRES_COMMAND_OK. Interestingly enough, the off nominal case was
handled properly, so this memory leak only occurred when CEL records were
successfully written.
This patch properly clears the result in the nominal code path.
(closes issue ASTERISK-19991)
Reported by: Etienne Lessard
Tested by: Etienne Lessard
patches:
mem_leak_cel_pgsql.patch uploaded by Etienne Lessard (license #6394)
Modified:
branches/1.8/cel/cel_pgsql.c
Modified: branches/1.8/cel/cel_pgsql.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/cel/cel_pgsql.c?view=diff&rev=372158&r1=372157&r2=372158
==============================================================================
--- branches/1.8/cel/cel_pgsql.c (original)
+++ branches/1.8/cel/cel_pgsql.c Tue Sep 4 21:16:17 2012
@@ -321,6 +321,7 @@
PQclear(result);
goto ast_log_cleanup;
}
+ PQclear(result);
ast_log_cleanup:
ast_free(sql);
More information about the asterisk-commits
mailing list