]> granicus.if.org Git - postgresql/commit
pg_dump: Don't leak memory in buildDefaultACLCommands()
authorStephen Frost <sfrost@snowman.net>
Sun, 7 May 2017 02:58:12 +0000 (22:58 -0400)
committerStephen Frost <sfrost@snowman.net>
Sun, 7 May 2017 02:58:12 +0000 (22:58 -0400)
commit09f842181943b6e83b0779f2e872ff0180b66883
tree9d13bca0be3e52486e21b15918ffd9bfe7def8a8
parentaa5d3c0b3fb906dfa910b0ca6f75ab701b2f1c09
pg_dump: Don't leak memory in buildDefaultACLCommands()

buildDefaultACLCommands() didn't destroy the string buffer created in
certain cases, leading to a memory leak.  Fix by destroying the buffer
before returning from the function.

Spotted by Coverity.

Author: Michael Paquier

Back-patch to 9.6 where buildDefaultACLCommands() was added.
src/bin/pg_dump/dumputils.c