Fixed possible memory corruption on request shutdown

`valgrind -q --tool=memcheck sapi/cli/php tests/reflection/001.phpt`
This commit is contained in:
Dmitry Stogov 2005-05-31 17:42:15 +00:00
parent dac8f964f2
commit 84fef05939

View File

@ -684,6 +684,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);