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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq: Remove redundant null pointer checks before free()
Date: 2022-06-18 03:17:03
Message-ID: Yq1Drw2Ufo1GUVKy@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-06-18 03:45:53 Re: libpq: Remove redundant null pointer checks before free()
Previous Message Michael Paquier 2022-06-18 03:07:06 Re: Add TAP test for auth_delay extension