From ce6b662ed61faacdcff075fac55a1e4ba84cd665 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 31 May 2005 17:40:48 +0000 Subject: [PATCH] Fixed possible memory corruption on request shutdown `valgrind -q --tool=memcheck sapi/cli/php tests/reflection/001.phpt` --- main/php_variables.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.50.1