]> granicus.if.org Git - php/commitdiff
Make sure to clear out the refcount.
authorAndrei Zmievski <andrei@php.net>
Wed, 1 Oct 2003 23:13:04 +0000 (23:13 +0000)
committerAndrei Zmievski <andrei@php.net>
Wed, 1 Oct 2003 23:13:04 +0000 (23:13 +0000)
main/main.c

index 9439a3dcdf0913673f470f1a19b3263e31dc5938..f4137479ae5ae5f72f80f0647d7382c8a76695a5 100644 (file)
@@ -1558,6 +1558,7 @@ static void php_build_argv(char *s TSRMLS_DC)
        ALLOC_ZVAL(arr);
        array_init(arr);
        arr->is_ref = 0;
+       arr->refcount = 0;
 
        /* Prepare argv */
        if (SG(request_info).argc) { /* are we in cli sapi? */
@@ -1611,6 +1612,7 @@ static void php_build_argv(char *s TSRMLS_DC)
        }
        Z_TYPE_P(argc) = IS_LONG;
        argc->is_ref = 0;
+       argc->refcount = 0;
 
        if (PG(register_globals) || SG(request_info).argc) {
                arr->refcount++;