Re: Collection of memory leaks for ECPG driver - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Collection of memory leaks for ECPG driver
Date
Msg-id CAB7nPqTSJ6nBYz_i6v93=3V=UC6BOE-htm3-PTks7O8xM3MpZw@mail.gmail.com
Whole thread Raw
In response to Re: Collection of memory leaks for ECPG driver  (Michael Meskes <meskes@postgresql.org>)
Responses Re: Collection of memory leaks for ECPG driver  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Jun 12, 2015 at 10:01 PM, Michael Meskes <meskes@postgresql.org> wrote:
> On Mon, Jun 08, 2015 at 10:50:25PM +0900, Michael Paquier wrote:
> Right, that's because they were developed before free received the safeguard, or the programmer simply didn't know at
thatpoint in time. Unless I'm mistaken we have other code that only calls free() without an additional safeguard, so
whyshuld ecpglib be special? If you don't like it using both approaches, feel free to remove the check in the other
case.:) 

Well, I can send patches...

> More seriously, though, does anyone know of any platform where free(NULL) is *not* a noop?

I recall reading that some past versions of SunOS crashed, but it is
rather old...
--
Michael



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: 9.5 release notes
Next
From: Tom Lane
Date:
Subject: Re: Time to fully remove heap_formtuple() and friends?