Re: Why pfree(NULL) breaks execution?

From: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Marios Vodas <mvodas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Why pfree(NULL) breaks execution?
Date: 2011-03-04 15:04:30
Message-ID: AANLkTi=Ldfu3N0j2bZsLCfBtUnXCLmpnLBtSS9-RRX-B@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4 March 2011 14:50, Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-03-04 15:18:38 Re: Sync Rep v19
Previous Message Robert Haas 2011-03-04 14:50:11 Re: Why pfree(NULL) breaks execution?