Memory leak fix in rmtree.c - Mailing list pgsql-hackers

From Ильясов Ян
Subject Memory leak fix in rmtree.c
Date
Msg-id GV1P251MB1004EB38F3330E50FA64F24ACD462@GV1P251MB1004.EURP251.PROD.OUTLOOK.COM
Whole thread Raw
Responses Re: Memory leak fix in rmtree.c
List pgsql-hackers
Hello hackers,

Just like some of my colleagues I've been using Svace*
and I think I've found a bug in src/common/rmtree.c .

In 64th line function returns false in case it couldn't open a directory,
but the memory, that have been allocated for char** dirnames is
not freed.

The patch that has a fix of this is attached and is based on the latest
master code.

* ​- https://svace.pages.ispras.ru/svace-website/en/

Kind regards,
Ian Ilyasov.

Attachment

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: pgsql: Add EXPLAIN (MEMORY) to report planner memory consumption
Next
From: Daniel Gustafsson
Date:
Subject: Re: Memory leak fix in rmtree.c