Re: Why pfree(NULL) breaks execution? - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Why pfree(NULL) breaks execution?
Date
Msg-id AANLkTi=Ldfu3N0j2bZsLCfBtUnXCLmpnLBtSS9-RRX-B@mail.gmail.com
Whole thread Raw
In response to Re: Why pfree(NULL) breaks execution?  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Why pfree(NULL) breaks execution?
List pgsql-hackers
On 4 March 2011 14:50, Robert Haas <robertmhaas@gmail.com> wrote:
> I think that free(NULL) works on some platforms but not all.  I don't
> see what advantage we'd get out of making pfree(NULL) silently work,
> and there's a clear disadvantage: it would remove a useful sanity
> check.

I don't feel particularly strongly about what pfree() should do one
way or the other, but that isn't so; free(NULL) works on all
platforms, and is required to by the standard.

--
Regards,
Peter Geoghegan


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Why pfree(NULL) breaks execution?
Next
From: Simon Riggs
Date:
Subject: Re: Sync Rep v19