Re: libpq: Remove redundant null pointer checks before free()

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: libpq: Remove redundant null pointer checks before free()
Дата
Msg-id Yq1Drw2Ufo1GUVKy@paquier.xyz
обсуждение исходный текст
Ответ на Re: libpq: Remove redundant null pointer checks before free()  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: libpq: Remove redundant null pointer checks before free()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Jun 17, 2022 at 09:03:23PM +0200, Peter Eisentraut wrote:
> I'm pretty sure PostgreSQL code already depends on this behavior anyway.
> The code just isn't consistent about it.

In the frontend, I'd like to think that you are right and that we have
already some places doing that.  The backend is a different story,
like in GetMemoryChunkContext().  That should be easy enough to check
with some LD_PRELOAD wizardry, at least.
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Add TAP test for auth_delay extension
Следующее
От: Tom Lane
Дата:
Сообщение: Re: libpq: Remove redundant null pointer checks before free()