]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Fix memory leak when CEL is successfully written to PostgreSQL database
authorMatthew Jordan <mjordan@digium.com>
Wed, 5 Sep 2012 02:19:25 +0000 (02:19 +0000)
committerMatthew Jordan <mjordan@digium.com>
Wed, 5 Sep 2012 02:19:25 +0000 (02:19 +0000)
commit0878642dc0da5f0f851fab12d8390680b04e8925
tree7e54c4c23155414ec8304ae5d1e128a983f3e6a5
parent5fefc48cd8680793478d4eb37f48d677d35c6980
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@372165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
cel/cel_pgsql.c