]> granicus.if.org Git - php/commitdiff
Fixed bug #22900 (declaration of namespaces with same name results in leaks).
authorIlia Alshanetsky <iliaa@php.net>
Wed, 26 Mar 2003 17:06:08 +0000 (17:06 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 26 Mar 2003 17:06:08 +0000 (17:06 +0000)
Zend/zend_compile.c

index 6329030910981644bb204d33f95fb12a61083a18..139186ca545f8e254fab38203638f6bdd7fdb018 100644 (file)
@@ -3280,7 +3280,8 @@ void zend_do_begin_namespace(znode *ns_token, znode *ns_name TSRMLS_DC)
                ns = *pns;
                if(ns->type != ZEND_NAMESPACE || ns == CG(active_namespace)) {
                        zend_error(E_COMPILE_ERROR, "Cannot redefine namespace '%s' - class or namespace with this name already defined", ns->name);
-               } 
+               }
+               FREE_PNODE(ns_name);
        } else {
                ns = emalloc(sizeof(zend_namespace));
                ns->name = ns_name->u.constant.value.str.val;