Re: Plug minor memleak in pg_dump
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Daniel Gustafsson <daniel@yesql.se>,
Kyotaro Horiguchi <horikyota.ntt@gmail.com>, gkokolatos@pm.me, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-02-09T05:02:59Z
Lists: pgsql-hackers
Attachments
- v1-0001-Fix-a-memory-leak-while-reading-Table-of-Contents.patch (application/x-patch) patch v1-0001
On Wed, Feb 9, 2022 at 8:26 AM Michael Paquier <michael@paquier.xyz> wrote: > > On Wed, Feb 02, 2022 at 10:06:13AM +0100, Daniel Gustafsson wrote: > > The leak itself is clearly not something to worry about wrt memory pressure. > > We do read into tmp and free it in other places in the same function though (as > > you note above), so for code consistency alone this is worth doing IMO (and it > > reduces the risk of static analyzers flagging this). > > > > Unless objected to I will go ahead with getting this committed. > > Looks like you forgot to apply that? Attaching the patch that I suggested above, also the original patch proposed by Georgios is at [1], leaving the decision to the committer to pick up the best one. [1] https://www.postgresql.org/message-id/oZwKiUxFsVaetG2xOJp7Hwao8F1AKIdfFDQLNJrnwoaxmjyB-45r_aYmhgXHKLcMI3GT24m9L6HafSi2ns7WFxXe0mw2_tIJpD-Z3vb_eyI%3D%40pm.me Regards, Bharath Rupireddy.
Commits
-
Free temporary memory when reading TOC
- 1a29217a00a3 15.0 landed