pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: libpq: Remove redundant null pointer checks before free()
Date: Fri, 17 Jun 2022 15:31:58 -0400
Message-ID: <1285716.1655494318@sss.pgh.pa.us> (raw)
In-Reply-To: <5eb1b215-acc2-9922-50d8-fc57a3e4f5e8@enterprisedb.com>
References: <dac5d2d0-98f5-94d9-8e69-46da2413593d@enterprisedb.com>
	<Yqv0E7iIUfv4cpp2@paquier.xyz>
	<1074830.1655442689@sss.pgh.pa.us>
	<5eb1b215-acc2-9922-50d8-fc57a3e4f5e8@enterprisedb.com>

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





view thread (10+ messages)  latest in thread

Message-ID: <1285716.1655494318@sss.pgh.pa.us>
Permalink:  ../1285716.1655494318@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1285716.1655494318@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@enterprisedb.com, michael@paquier.xyz
  Subject: Re: libpq: Remove redundant null pointer checks before free()
  In-Reply-To: <1285716.1655494318@sss.pgh.pa.us>
  References: <dac5d2d0-98f5-94d9-8e69-46da2413593d@enterprisedb.com> <Yqv0E7iIUfv4cpp2@paquier.xyz> <1074830.1655442689@sss.pgh.pa.us> <5eb1b215-acc2-9922-50d8-fc57a3e4f5e8@enterprisedb.com> <1285716.1655494318@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox