summaryrefslogtreecommitdiff
path: root/ext/xml/xml.c
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2003-12-08 07:15:32 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2003-12-08 07:15:32 +0000
commitcbddbca787abda46d276b6943f2f1361eb2421b0 (patch)
treeda7a607dbbff7f2f72f1a69b04b8d04a8d09d2ac /ext/xml/xml.c
parent9ad6aaea636319422eaac4689aa0813b2a51c921 (diff)
downloadphp-git-cbddbca787abda46d276b6943f2f1361eb2421b0.tar.gz
NULL pointers can be passed to free_fcn. This is the correct behaviour.
Diffstat (limited to 'ext/xml/xml.c')
-rw-r--r--ext/xml/xml.c4
1 files changed, 3 insertions, 1 deletions
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)