Re: Plug minor memleak in pg_dump - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject Re: Plug minor memleak in pg_dump
Date
Msg-id CALj2ACW=KShGL28LCWhoCvo25m1Ap4ZRDdndXz0Krgfz=hP=Tw@mail.gmail.com
Whole thread Raw
In response to Re: Plug minor memleak in pg_dump  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
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.

Attachment

pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints
Next
From: Michael Paquier
Date:
Subject: Re: make MaxBackends available in _PG_init