www.delorie.com/archives/browse.cgi | search |
Date: | Wed, 26 Feb 1997 16:43:57 +0000 |
From: | Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz> |
Subject: | Re: Freeing null |
To: | Roland Acton <malyon AT netcom DOT com> |
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 |
References: | <5etnpb$42p AT freenet-news DOT carleton DOT ca> <malyonE66p7u DOT Ju0 AT netcom DOT com> |
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.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |