]> granicus.if.org Git - php/commitdiff
forgot SEPARATE_ZVAL, produced segfaults.
authorChristian Stocker <chregu@php.net>
Tue, 12 Mar 2002 11:15:03 +0000 (11:15 +0000)
committerChristian Stocker <chregu@php.net>
Tue, 12 Mar 2002 11:15:03 +0000 (11:15 +0000)
 segfaulted only in 4_2_0 (not in HEAD and 4_0_7, strange...)

ext/domxml/php_domxml.c

index 960b39e23afc37b41a1b672125d0f119e0a21033..ee2e5f985c7b5b3de61ae2e338ebee58573d12cf 100644 (file)
@@ -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;
                        }