Date: Wed, 26 Feb 1997 16:43:57 +0000 From: Bill Currie Subject: Re: Freeing null To: Roland Acton Cc: djgpp AT delorie DOT com Reply-to: billc AT blackmagic DOT tait DOT co DOT nz Message-id: <3314684D.51C1@blackmagic.tait.co.nz> Organization: Tait Electronics NZ MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit References: <5etnpb$42p AT freenet-news DOT carleton DOT ca> Roland Acton wrote: > > Paul Derbyshire (ao950 AT FreeNet DOT Carleton DOT CA) wrote: > > : What are the effects of free(ptr) if ptr happens to be null? > > It corrupts the free memory table, and eventually the computer crashes. No, quoting from 'info libc al free': Returns the allocated memory to the heap (*note malloc::.). If the PTR is `NULL', it does nothing. Bill -- Leave others their otherness.