public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Daniel Gustafsson <[email protected]>
Cc: Ranier Vilela <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Avoid possible memory leak (src/common/rmtree.c)
Date: Sat, 29 Jul 2023 11:54:48 +0900
Message-ID: <ZMR/[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAEudQAoN3-2ZKBALThnEk_q2hu8En5A0WG9O+5siJTQKVZzoWQ@mail.gmail.com>
<[email protected]>
On Tue, Jul 25, 2023 at 04:45:22PM +0200, Daniel Gustafsson wrote:
> Skimming the tree there doesn't seem to be any callers which aren't exiting or
> ereporting on failure so the real-world impact seems low. That being said,
> silencing static analyzers could be reason enough to delay allocation.
A different reason would be out-of-core code that uses rmtree() in a
memory context where the leak would be an issue if facing a failure
continuously? Delaying the allocation after the OPENDIR() seems like
a good practice anyway.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, ../ZMR%[email protected]/2-signature.asc)
download
view thread (4+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Avoid possible memory leak (src/common/rmtree.c)
In-Reply-To: <ZMR/[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox