]> granicus.if.org Git - postgresql/commit
Fix more memory leaks in failure path in buildACLCommands.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 11 Feb 2015 23:35:23 +0000 (18:35 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 11 Feb 2015 23:35:23 +0000 (18:35 -0500)
commit5ea8cfe8f721418cc54e2847a3867331e57dee20
tree3bc34bc7868ab4281266912a9cc804bf09bbec72
parent1a321fea71db878755a4a2c00d45b98e10842a92
Fix more memory leaks in failure path in buildACLCommands.

We already had one go at this issue in commit d73b7f973db5ec7e, but we
failed to notice that buildACLCommands also leaked several PQExpBuffers
along with a simply malloc'd string.  This time let's try to make the
fix a bit more future-proof by eliminating the separate exit path.

It's still not exactly critical because pg_dump will curl up and die on
failure; but since the amount of the potential leak is now several KB,
it seems worth back-patching as far as 9.2 where the previous fix landed.

Per Coverity, which evidently is smarter than clang's static analyzer.
src/bin/pg_dump/dumputils.c