Re: Fix resource leak (src/bin/pg_combinebackup/pg_combinebackup.c) - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Fix resource leak (src/bin/pg_combinebackup/pg_combinebackup.c)
Date
Msg-id ZZCzaZG7Y0Ld9ytp@paquier.xyz
Whole thread Raw
In response to Fix resource leak (src/bin/pg_combinebackup/pg_combinebackup.c)  (Ranier Vilela <ranier.vf@gmail.com>)
List pgsql-hackers
Hi Ranier,

On Sat, Dec 30, 2023 at 10:34:12AM -0300, Ranier Vilela wrote:
> The function scan_for_existing_tablespaces in
> (src/bin/pg_combinebackup/pg_combinebackup.c)
> Has a resource leak.
>
> The function opendir opendir
> <https://pubs.opengroup.org/onlinepubs/009604599/functions/opendir.html>
> Must be freed with closedir
> <https://pubs.opengroup.org/onlinepubs/009604599/functions/closedir.html>
>
> The commit affected is dc21234
> <http://dc212340058b4e7ecfc5a7a81ec50e7a207bf288>

The community receives its own coverity reports.  These are not public
but we are aware of the reports related to pg_basebackup and
pg_combinebackup as an effect of dc212340058b.  Robert is planning to
handle all these AFAIK once the new year vacations and such cool down.

In short there is no need to worry here :)

Thanks for the patches.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Why do parallel scans require syncscans (but not really)?
Next
From: Michael Paquier
Date:
Subject: Re: Fix copy and paste error (src/bin/pg_basebackup/pg_basebackup.c)