]> granicus.if.org Git - php/commitdiff
Fix that GLOBALS leak. We were explicitly adding GLOBALS to the main symbol table,
authorZeev Suraski <zeev@php.net>
Fri, 4 Jun 1999 12:22:19 +0000 (12:22 +0000)
committerZeev Suraski <zeev@php.net>
Fri, 4 Jun 1999 12:22:19 +0000 (12:22 +0000)
but there's no reason to do it (INIT_GLOBALS takes care of it if necessary.)

Zend/zend_execute_API.c

index 1589efdb19c0e8285e4dc34377539d71d826f084..3084dfaeae1618a19bfa20a1534ff3ca8a28299a 100644 (file)
@@ -100,18 +100,6 @@ void init_executor(CLS_D ELS_DC)
        EG(active_symbol_table) = &EG(symbol_table);
 
        zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_activator);
-
-       /* $GLOBALS array */
-       {
-               zval *globals = (zval *) emalloc(sizeof(zval));
-               
-               globals->value.ht = &EG(symbol_table);
-               globals->type = IS_ARRAY;
-               globals->refcount = 1;
-               globals->is_ref = 0;
-               zend_hash_update(&EG(symbol_table), "GLOBALS", sizeof("GLOBALS"), &globals, sizeof(zval *), NULL);
-       }
-
        EG(opline_ptr) = NULL;
 }