]> 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:22 +0000 (22:58 -0400)
committerStephen Frost <sfrost@snowman.net>
Sun, 7 May 2017 02:58:22 +0000 (22:58 -0400)
commitef42c1103708cbbb77fff674f339d452a13aac14
tree1d0c55ca26043928ad52b8df8fdc3e2805697984
parent92b15224b4eac8eeae0616491ccf0c852fa2dff9
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