diff --git a/NEWS b/NEWS index 2eb0a9c807f..e65b61fe692 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,9 @@ PHP NEWS . Fixed bug GH-18597 (Heap-buffer-overflow in zend_alloc.c when assigning string with UTF-8 bytes). (nielsdos) +- Soap: + . Fix memory leaks in php_http.c when call_user_function() fails. (nielsdos) + 06 Jun 2025, PHP 8.4.8 - Core: diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index a55780615f4..a1bd7dff0c8 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -411,6 +411,7 @@ int make_http_soap_request(zval *this_ptr, } else { zval_ptr_dtor(¶ms[0]); zval_ptr_dtor(&func); + zval_ptr_dtor(&retval); if (request != buf) { zend_string_release_ex(request, 0); } @@ -1329,6 +1330,7 @@ try_again: } else { zval_ptr_dtor(¶ms[0]); zval_ptr_dtor(&func); + zval_ptr_dtor(&retval); efree(content_encoding); zend_string_release_ex(http_headers, 0); zend_string_release_ex(http_body, 0);