| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql: Fix some bogus direct uses of realloc(). |
| Date: | 2014-11-18 18:28:31 |
| Message-ID: | E1XqnVv-0005pH-6J@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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.
Branch
------
REL9_4_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/3aa3ae8e1d959681d3396fe176cd8086e3b26c55
Modified Files
--------------
src/bin/pg_dump/parallel.c | 4 ++--
src/bin/psql/command.c | 7 +------
src/bin/psql/tab-complete.c | 9 ++-------
3 files changed, 5 insertions(+), 15 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | pgsql | 2014-11-18 20:20:13 | pgsql: Tag refs/tags/REL9_4_RC1 was created |
| Previous Message | Simon Riggs | 2014-11-18 10:26:45 | pgsql: Reduce btree scan overhead for < and > strategies |