From: Michael Wallner Date: Tue, 20 Feb 2018 12:43:02 +0000 (+0100) Subject: fix leak X-Git-Tag: RELEASE_3_2_0_RC1~40 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=3781fedcdef297da28e6f1ffe6f556e7ce659ac5;p=m6w6%2Fext-http fix leak --- diff --git a/src/php_http_message.c b/src/php_http_message.c index d076b6a..7d8a6f7 100644 --- a/src/php_http_message.c +++ b/src/php_http_message.c @@ -640,9 +640,7 @@ static void php_http_message_object_prophandler_set_headers(php_http_message_obj zend_hash_init(&obj->message->hdrs, zend_hash_num_elements(src), NULL, ZVAL_PTR_DTOR, 0); array_copy(HASH_OF(value), &obj->message->hdrs); - if (GC_REFCOUNT(&garbage) <= 1 && (garbage.u.flags & HASH_FLAG_INITIALIZED)) { - efree(HT_GET_DATA_ADDR(&garbage)); - } + zend_hash_destroy(&garbage); if (converted) { zval_ptr_dtor(value);