Re: libpq: Remove redundant null pointer checks before free() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: libpq: Remove redundant null pointer checks before free()
Date
Msg-id 1285716.1655494318@sss.pgh.pa.us
Whole thread Raw
In response to Re: libpq: Remove redundant null pointer checks before free()  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List pgsql-hackers
Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> On 17.06.22 07:11, Tom Lane wrote:
>> Notably, I think the choice
>> that pfree(NULL) is disallowed traces directly to worries about
>> coding-pattern-compatibility with pre-POSIX free().  Should we
>> revisit that?

> Yes please, and also repalloc().

repalloc no, because you wouldn't know which context to do the
allocation in.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: SGML doc file references
Next
From: Tom Lane
Date:
Subject: Re: SGML doc file references