Re: minor leaks in pg_dump (PG tarball 10.6)

2018-12-06 Thread Stephen Frost
Greetings, * Pavel Raiskup (prais...@redhat.com) wrote: > On Wednesday, December 5, 2018 4:59:18 PM CET Stephen Frost wrote: > > This change doesn't seem to make any sense to me..? If anything, seems > > like we'd end up overallocating memory *after* this change, where we > > don't today (though

Re: minor leaks in pg_dump (PG tarball 10.6)

2018-12-05 Thread Pavel Raiskup
On Wednesday, December 5, 2018 4:59:18 PM CET Stephen Frost wrote: > This change doesn't seem to make any sense to me..? If anything, seems > like we'd end up overallocating memory *after* this change, where we > don't today (though an analyzer tool might complain because we don't > free the memor

Re: minor leaks in pg_dump (PG tarball 10.6)

2018-12-05 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > * Pavel Raiskup (prais...@redhat.com) wrote: > >> - attrdefs = (AttrDefInfo *) pg_malloc(numDefaults * > >> sizeof(AttrDefInfo)); > >> ... > >> + attrdefs = (AttrDefInfo *) >

Re: minor leaks in pg_dump (PG tarball 10.6)

2018-12-05 Thread Tom Lane
Stephen Frost writes: > * Pavel Raiskup (prais...@redhat.com) wrote: >> -attrdefs = (AttrDefInfo *) pg_malloc(numDefaults * >> sizeof(AttrDefInfo)); >> ... >> +attrdefs = (AttrDefInfo *) >> pg_malloc(numDefaults * sizeof(AttrDefInfo)); > This chan

Re: minor leaks in pg_dump (PG tarball 10.6)

2018-12-05 Thread Stephen Frost
Greetings, * Pavel Raiskup (prais...@redhat.com) wrote: > Among other reports (IMO clearly non-issues), I'm sending patch which > fixes/points to a few resource leaks detected by Coverity that might be > worth fixing. If they are not, feel free to ignore this mail. > diff --git a/src/bin/pg_dump