diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2008-09-16 00:38:45 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2008-09-16 00:38:45 +0000 |
commit | e39d08794e33568e94ca948cd36bb2d3df33d6b3 (patch) | |
tree | b9f7dd535ce14de625d4ead60de8ee7576a64c10 | |
parent | b845244370dd9f755972e0f833e39f0dcd289494 (diff) | |
download | php-git-e39d08794e33568e94ca948cd36bb2d3df33d6b3.tar.gz |
Fixed bug #46087 (DOMXPath - segfault on destruction of a cloned object).
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | ext/dom/php_dom.c | 6 |
2 files changed, 6 insertions, 2 deletions
@@ -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) diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 38c8dfacab..1494e286fe 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -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); |