Re: Avoid possible memory leak (src/common/rmtree.c)

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Avoid possible memory leak (src/common/rmtree.c)
Date: 2023-07-25 14:45:22
Message-ID: 3FE85611-3B27-4E88-B61B-36FEDE3F2C59@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 25 Jul 2023, at 16:31, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> wrote:

> rmtree function can leak 64 bytes per call,
> when it can't open a directory.

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.

--
Daniel Gustafsson

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Melih Mutlu 2023-07-25 14:57:52 Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication
Previous Message Alvaro Herrera 2023-07-25 14:35:09 Re: [PATCH] Small refactoring of inval.c and inval.h