]> granicus.if.org Git - php/commitdiff
Fixed bug #46087 (DOMXPath - segfault on destruction of a cloned object).
authorIlia Alshanetsky <iliaa@php.net>
Tue, 16 Sep 2008 00:38:45 +0000 (00:38 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 16 Sep 2008 00:38:45 +0000 (00:38 +0000)
NEWS
ext/dom/php_dom.c

diff --git a/NEWS b/NEWS
index 1296b8c4eec26218da4c4f05644e2a6f376bfc07..42dc222f30cce6f2333bd7b6197fffadd0bb569b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,8 @@ PHP                                                                        NEWS
 - Changed error level E_ERROR into E_WARNING in Soap extension methods 
   parameter validation. (Felipe)
 
+- Fixed bug #46087 (DOMXPath - segfault on destruction of a cloned object).
+  (Ilia)
 - Fixed bug #46086 (Segfault when accessing fileinfo class properties).
   (Scott)
 - Fixed bug #46072 (Compile failure under IRIX 6.5.30 building util.c) (Greg)
index 38c8dfacabd248fe55c4ea137815b5095a34e763..1494e286fe1555ff768dcf79393ae4ef152bc9d3 100644 (file)
@@ -965,8 +965,10 @@ void dom_xpath_objects_free_storage(void *object TSRMLS_DC)
                intern->ptr = NULL;
        }
 
-       zend_hash_destroy(intern->registered_phpfunctions);
-       FREE_HASHTABLE(intern->registered_phpfunctions);
+       if (intern->registered_phpfunctions) {
+               zend_hash_destroy(intern->registered_phpfunctions);
+               FREE_HASHTABLE(intern->registered_phpfunctions);
+       }
        
        if (intern->node_list) {
                zend_hash_destroy(intern->node_list);