From: Andrei Zmievski Date: Wed, 1 Oct 2003 23:13:04 +0000 (+0000) Subject: Make sure to clear out the refcount. X-Git-Tag: php-4.3.4RC2~85 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e9a4ecc0ea0e9d011a2fd7ae2725bfc2762eee5;p=php Make sure to clear out the refcount. --- diff --git a/main/main.c b/main/main.c index 9439a3dcdf..f4137479ae 100644 --- a/main/main.c +++ b/main/main.c @@ -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++;