summaryrefslogtreecommitdiff
path: root/Zend/zend_builtin_functions.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2000-12-07 09:39:16 +0000
committerStanislav Malyshev <stas@php.net>2000-12-07 09:39:16 +0000
commitb531e43c49a64d44454c486ab4240c10b8fc8003 (patch)
tree0bce7ce24457512e199a609a594b1401c7a78ced /Zend/zend_builtin_functions.c
parent52d3777f503c8fb5f309002f0c04f890f6a25a79 (diff)
downloadphp-git-b531e43c49a64d44454c486ab4240c10b8fc8003.tar.gz
Fix memory leak - get_current_key mallocs it's result, no need to
copy it.
Diffstat (limited to 'Zend/zend_builtin_functions.c')
-rw-r--r--Zend/zend_builtin_functions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index e693fab1e0..057607f854 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -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);