]> granicus.if.org Git - php/commitdiff
(php_set_session_var) Initialize the refcount here.
authorAndrei Zmievski <andrei@php.net>
Sat, 4 Dec 1999 18:56:17 +0000 (18:56 +0000)
committerAndrei Zmievski <andrei@php.net>
Sat, 4 Dec 1999 18:56:17 +0000 (18:56 +0000)
ext/session/session.c

index d924881bc01153fc4c66458a9dfb4af0826621c7..0b9491506e641f140ae7b31b339901f9b3a14f76 100644 (file)
@@ -165,6 +165,7 @@ static void php_set_session_var(char *name, size_t namelen,
        state_val_copy = (zval *)emalloc(sizeof(zval));
        *state_val_copy = *state_val;
        zval_copy_ctor(state_val_copy);
+       state_val_copy->refcount = 0;
 
        if (PG(gpc_globals) && PG(track_vars)) {
                zend_set_hash_symbol(state_val_copy, name, namelen, 1, 2, PS(http_state_vars)->value.ht, &EG(symbol_table));