Re: Fix some resources leaks (src/bin/pg_basebackup/pg_createsubscriber.c)

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Euler Taveira <euler(at)eulerto(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix some resources leaks (src/bin/pg_basebackup/pg_createsubscriber.c)
Date: 2024-04-01 18:01:38
Message-ID: CAEudQArK5HxVF2WVfh2YRi7N3J44LPJfgP4jr8O2KNYA4d=opw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em seg., 1 de abr. de 2024 às 14:52, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> escreveu:

> "Euler Taveira" <euler(at)eulerto(dot)com> writes:
> > On Wed, Mar 27, 2024, at 8:50 PM, Ranier Vilela wrote:
> >> Coverity has some reports in the new code
> >> pg_createsubscriber.c
> >> I think that Coverity is right.
>
> > It depends on your "right" definition. If your program execution is
> ephemeral
> > and the leak is just before exiting, do you think it's worth it?
>
> I agree with Ranier, actually. The functions in question don't
> exit() themselves, but return control to a caller that might or
> might not choose to exit. I don't think they should be assuming
> that an exit will happen promptly, even if that's true today.
>
> The community Coverity run found a few additional leaks of the same
> kind in that file. I pushed a merged fix for all of them.
>
Thanks Tom, for the commit.

best regards,
Ranier Vilela

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-04-01 18:09:37 Re: Statistics Import and Export
Previous Message Tom Lane 2024-04-01 17:56:13 Re: Statistics Import and Export