From: Moriyoshi Koizumi Date: Mon, 8 Dec 2003 07:15:32 +0000 (+0000) Subject: NULL pointers can be passed to free_fcn. This is the correct behaviour. X-Git-Tag: php-5.0.0b3RC1~193 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cbddbca787abda46d276b6943f2f1361eb2421b0;p=php NULL pointers can be passed to free_fcn. This is the correct behaviour. --- diff --git a/ext/xml/xml.c b/ext/xml/xml.c index 83f377140a..8b3306dd57 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -192,7 +192,9 @@ static void *php_xml_realloc_wrapper(void *ptr, size_t sz) static void php_xml_free_wrapper(void *ptr) { - efree(ptr); + if (ptr != NULL) { + efree(ptr); + } } PHP_MINIT_FUNCTION(xml)