Fix some bogus direct uses of realloc().

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 8824bae87b78036c41ba794d96a0e68859df5990
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2014-11-18T18:28:13Z
Releases: 9.3.6
Fix some bogus direct uses of realloc().

pg_dump/parallel.c was using realloc() directly with no error check.
While the odds of an actual failure here seem pretty low, Coverity
complains about it, so fix by using pg_realloc() instead.

While looking for other instances, I noticed a couple of places in
psql that hadn't gotten the memo about the availability of pg_realloc.
These aren't bugs, since they did have error checks, but verbosely
inconsistent code is not a good thing.

Back-patch as far as 9.3.  9.2 did not have pg_dump/parallel.c, nor
did it have pg_realloc available in all frontend code.

Files

PathChange+/−
src/bin/pg_dump/parallel.c modified +2 −2
src/bin/psql/command.c modified +1 −6
src/bin/psql/tab-complete.c modified +2 −7