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

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq: Remove redundant null pointer checks before free()
Date: 2022-06-17 19:03:23
Message-ID: 5333caf7-7667-bc58-0fd0-2e82eaf01967@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 17.06.22 05:25, Michael Paquier wrote:
> On Thu, Jun 16, 2022 at 10:07:33PM +0200, Peter Eisentraut wrote:
>> calls, where the "if" part is unnecessary. This is of course pretty
>> harmless, but some functions like scram_free() and freePGconn() have become
>> so bulky that it becomes annoying. So while I was doing some work in that
>> area I undertook to simplify this.
> Seems fine. Would some of the buildfarm dinosaurs hiccup on that?
> gaur is one that comes into mind.

I'm pretty sure PostgreSQL code already depends on this behavior anyway.
The code just isn't consistent about it.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2022-06-17 19:07:58 Re: libpq: Remove redundant null pointer checks before free()
Previous Message Alvaro Herrera 2022-06-17 18:31:50 Re: Using PQexecQuery in pipeline mode produces unexpected Close messages