summaryrefslogtreecommitdiff
path: root/ext/domxml/php_domxml.c
diff options
context:
space:
mode:
authorChristian Stocker <chregu@php.net>2002-03-12 11:15:03 +0000
committerChristian Stocker <chregu@php.net>2002-03-12 11:15:03 +0000
commitb6d4004fd9456ae81a81a7b374c0b640f1d83a3f (patch)
tree9952a40b9171a4be286aceaccb6b28a72fbf8501 /ext/domxml/php_domxml.c
parent92dd5e611b897bdca8ba27cbfcdc0fc3d7416c85 (diff)
downloadphp-git-b6d4004fd9456ae81a81a7b374c0b640f1d83a3f.tar.gz
forgot SEPARATE_ZVAL, produced segfaults.
segfaulted only in 4_2_0 (not in HEAD and 4_0_7, strange...)
Diffstat (limited to 'ext/domxml/php_domxml.c')
-rw-r--r--ext/domxml/php_domxml.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c
index 960b39e23a..ee2e5f985c 100644
--- a/ext/domxml/php_domxml.c
+++ b/ext/domxml/php_domxml.c
@@ -2378,7 +2378,7 @@ PHP_FUNCTION(domxml_doc_get_element_by_id)
xmlXPathObjectPtr xpathobjp;
xmlNode *contextnodep;
int name_len;
- char *str,*name;
+ char *str, *name;
contextnode = NULL;
contextnodep = NULL;
@@ -2423,9 +2423,10 @@ PHP_FUNCTION(domxml_doc_get_element_by_id)
xmlNodePtr node = nodesetp->nodeTab[0];
int retnode;
rv = php_domobject_new(node, &retnode TSRMLS_CC);
+ SEPARATE_ZVAL(&rv);
}
else {
- /*return false array, if no nodes were found */
+ /*return false, if no nodes were found */
RETURN_FALSE;
}