Merged revisions 77318 via svnmerge from
authorMark Michelson <mmichelson@digium.com>
Thu, 26 Jul 2007 18:31:28 +0000 (18:31 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 26 Jul 2007 18:31:28 +0000 (18:31 +0000)
commit625410df63308fdc15d00f393eb0734babffa4a7
tree6a86ed891f4cdb7d958b5fa7d240893c58a45b07
parentf8483a0d04f73e9d4c4f665efd5397cf96b17510
Merged revisions 77318 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77318 | mmichelson | 2007-07-26 13:30:29 -0500 (Thu, 26 Jul 2007) | 8 lines

Two consecutive calls to PQfinish could occur, meaning free gets called on the same variable twice.
This patch sets the connection to NULL after calls to PQfinish so that the problem does not occur.
Also in this patch, prashant_jois informed me that it is safe to pass a null pointer to PQfinish, so
I have removed the check for conn's existence from my_unload_module.

(closes issue 10295, reported by junky, patched by me with input from prashant_jois)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
cdr/cdr_pgsql.c