]> granicus.if.org Git - php/commitdiff
Fix memory leak - get_current_key mallocs it's result, no need to
authorStanislav Malyshev <stas@php.net>
Thu, 7 Dec 2000 09:39:16 +0000 (09:39 +0000)
committerStanislav Malyshev <stas@php.net>
Thu, 7 Dec 2000 09:39:16 +0000 (09:39 +0000)
copy it.

Zend/zend_builtin_functions.c

index e693fab1e0639b14260327499048e9f05f21af01..057607f854a407cbd6aa03da8920a2359681a342 100644 (file)
@@ -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);