]> granicus.if.org Git - postgresql/commit
Check version before allocating PQExpBuffer
authorStephen Frost <sfrost@snowman.net>
Mon, 15 Jul 2013 01:17:59 +0000 (21:17 -0400)
committerStephen Frost <sfrost@snowman.net>
Mon, 15 Jul 2013 01:17:59 +0000 (21:17 -0400)
commit3355443fb188b86d59ca90912d5456b427c29116
tree100dd1ddec253a6e3b6d121bde3c6793c20fcc54
parent01337d46eb34503b81b989885d0aa3e25da5a96d
Check version before allocating PQExpBuffer

In pg_dump.c:getEventTriggers, check what major version we are on
before calling createPQExpBuffer() to avoid leaking that bit of
memory.

Leak discovered by the Coverity scanner.

Back-patch to 9.3 where support for dumping event triggers was
added.
src/bin/pg_dump/pg_dump.c