Re: efree() and NULL

From: Date: Mon, 14 May 2001 13:44:28 +0000
Subject: Re: efree() and NULL
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-55162@lists.php.net to get a copy of this message
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). Zeev

« previous php.dev (#55162) next »