mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed possible memory corruption on request shutdown
`valgrind -q --tool=memcheck sapi/cli/php tests/reflection/001.phpt`
This commit is contained in:
parent
dac8f964f2
commit
84fef05939
1 changed files with 2 additions and 0 deletions
|
@ -684,6 +684,8 @@ int php_hash_environment(TSRMLS_D)
|
||||||
dummy_track_vars_array->refcount++;
|
dummy_track_vars_array->refcount++;
|
||||||
}
|
}
|
||||||
PG(http_globals)[i] = dummy_track_vars_array;
|
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);
|
zend_hash_update(&EG(symbol_table), auto_global_records[i].name, auto_global_records[i].name_len, &PG(http_globals)[i], sizeof(zval *), NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue