summaryrefslogtreecommitdiff
path: root/main/php_variables.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2005-05-31 17:40:48 +0000
committerDmitry Stogov <dmitry@php.net>2005-05-31 17:40:48 +0000
commitce6b662ed61faacdcff075fac55a1e4ba84cd665 (patch)
tree21d7dc99a49944d85a030cf332db0f77dbf502ac /main/php_variables.c
parent08fdbaecf8dade141e6c224758becadb4e2adca9 (diff)
downloadphp-git-ce6b662ed61faacdcff075fac55a1e4ba84cd665.tar.gz
Fixed possible memory corruption on request shutdown
`valgrind -q --tool=memcheck sapi/cli/php tests/reflection/001.phpt`
Diffstat (limited to 'main/php_variables.c')
-rw-r--r--main/php_variables.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main/php_variables.c b/main/php_variables.c
index 1e0180458c..cd28efd1ff 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -685,6 +685,8 @@ int php_hash_environment(TSRMLS_D)
dummy_track_vars_array->refcount++;
}
PG(http_globals)[i] = dummy_track_vars_array;
+ } else {
+ PG(http_globals)[i]->refcount++;
}
zend_hash_update(&EG(symbol_table), auto_global_records[i].name, auto_global_records[i].name_len, &PG(http_globals)[i], sizeof(zval *), NULL);