mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix memory leak - get_current_key mallocs it's result, no need to
copy it.
This commit is contained in:
parent
52d3777f50
commit
b531e43c49
1 changed files with 1 additions and 1 deletions
|
@ -592,7 +592,7 @@ ZEND_FUNCTION(get_class_methods)
|
|||
while ((key_type = zend_hash_get_current_key(&ce->function_table, &string_key, &num_key)) != HASH_KEY_NON_EXISTANT) {
|
||||
if (key_type == HASH_KEY_IS_STRING) {
|
||||
MAKE_STD_ZVAL(method_name);
|
||||
ZVAL_STRING(method_name, string_key, 1);
|
||||
ZVAL_STRING(method_name, string_key, 0);
|
||||
zend_hash_next_index_insert(return_value->value.ht, &method_name, sizeof(zval *), NULL);
|
||||
}
|
||||
zend_hash_move_forward(&ce->function_table);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue