summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2008-09-16 00:38:45 +0000
committerIlia Alshanetsky <iliaa@php.net>2008-09-16 00:38:45 +0000
commite39d08794e33568e94ca948cd36bb2d3df33d6b3 (patch)
treeb9f7dd535ce14de625d4ead60de8ee7576a64c10
parentb845244370dd9f755972e0f833e39f0dcd289494 (diff)
downloadphp-git-e39d08794e33568e94ca948cd36bb2d3df33d6b3.tar.gz
Fixed bug #46087 (DOMXPath - segfault on destruction of a cloned object).
-rw-r--r--NEWS2
-rw-r--r--ext/dom/php_dom.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 1296b8c4ee..42dc222f30 100644
--- 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)
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);