Re: efree() and NULL
| From: | Thies C. Arntzen | Date: | Mon, 14 May 2001 15:37:24 +0000 |
| Subject: | Re: efree() and NULL | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-55176@lists.php.net to get a copy of this message | ||
On Mon, May 14, 2001 at 04:44:28PM +0300, Zeev Suraski wrote:
> At 16:00 14/5/2001, Andrei Zmievski wrote:
> >It doesn't seem that efree() is equivalent to free() as far operating on
> >NULL pointers. If ptr == NULL, free(ptr) is a no-op, but efree() will
> >probably barf on it.. Can we make them equivalent?
>
> We could, but PHP is currently written in a way that already takes this
> assumption. I think that efree() crashing on NULL pointers actually helps
> weed out bugs (bugs that could go unnoticed because they'd have no symptoms
> if it silently ignores NULLs).
i'd like to second zeev here.
tc