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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Avoid possible memory leak (src/common/rmtree.c)
Дата
Msg-id ZMR/eCCVxaFYcL0s@paquier.xyz
обсуждение исходный текст
Ответ на Re: Avoid possible memory leak (src/common/rmtree.c)  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: Avoid possible memory leak (src/common/rmtree.c)
Список pgsql-hackers
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

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Support worker_spi to execute the function dynamically.
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Row pattern recognition