Re: Memory leak fix in rmtree.c

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: Memory leak fix in rmtree.c
Дата
Msg-id 466B942B-1FAF-4E7F-A369-F956A44C8C73@yesql.se
обсуждение исходный текст
Ответ на Memory leak fix in rmtree.c  (Ильясов Ян <ianilyasov@outlook.com>)
Ответы RE: Memory leak fix in rmtree.c  (Ильясов Ян <ianilyasov@outlook.com>)
Список pgsql-hackers
> On 6 Feb 2024, at 10:34, Ильясов Ян <ianilyasov@outlook.com> wrote:

> 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.

dirnames isn't allocated at this point, it's palloc'd after this return
statement on line 67.

--
Daniel Gustafsson




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ильясов Ян
Дата:
Сообщение: Memory leak fix in rmtree.c
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: Synchronizing slots from primary to standby