Skip to content

Commit 43047fd

Browse files
author
Andrei Zmievski
committed
(php_set_session_var) Initialize the refcount here.
1 parent 7532393 commit 43047fd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/session/session.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ static void php_set_session_var(char *name, size_t namelen,
165165
state_val_copy = (zval *)emalloc(sizeof(zval));
166166
*state_val_copy = *state_val;
167167
zval_copy_ctor(state_val_copy);
168+
state_val_copy->refcount = 0;
168169

169170
if (PG(gpc_globals) && PG(track_vars)) {
170171
zend_set_hash_symbol(state_val_copy, name, namelen, 1, 2, PS(http_state_vars)->value.ht, &EG(symbol_table));

0 commit comments

Comments
 (0)