[asterisk-commits] mjordan: branch 11 r372175 - in /branches/11: ./ cel/cel_pgsql.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 4 21:25:25 CDT 2012
Author: mjordan
Date: Tue Sep 4 21:25:22 2012
New Revision: 372175
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=372175
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)
........
Merged revisions 372158 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 372165 from http://svn.asterisk.org/svn/asterisk/branches/10
Modified:
branches/11/ (props changed)
branches/11/cel/cel_pgsql.c
Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Modified: branches/11/cel/cel_pgsql.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/cel/cel_pgsql.c?view=diff&rev=372175&r1=372174&r2=372175
==============================================================================
--- branches/11/cel/cel_pgsql.c (original)
+++ branches/11/cel/cel_pgsql.c Tue Sep 4 21:25:22 2012
@@ -332,6 +332,7 @@
PQclear(result);
goto ast_log_cleanup;
}
+ PQclear(result);
ast_log_cleanup:
ast_free(sql);
More information about the asterisk-commits
mailing list