Skip to content

Commit a44e3f4

Browse files
committed
Fix memory leaks in php_http.c when call_user_function() fails
retval can be refcounted but is not destroyed. Closes GH-18638.
1 parent c978111 commit a44e3f4

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ PHP NEWS
1212
. Fix memory leak when calloc() fails in php_readline_completion_cb().
1313
(nielsdos)
1414

15+
- Soap:
16+
. Fix memory leaks in php_http.c when call_user_function() fails. (nielsdos)
17+
1518
05 Jun 2025, PHP 8.3.22
1619

1720
- Core:

ext/soap/php_http.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ int make_http_soap_request(zval *this_ptr,
416416
} else {
417417
zval_ptr_dtor(&params[0]);
418418
zval_ptr_dtor(&func);
419+
zval_ptr_dtor(&retval);
419420
if (request != buf) {
420421
zend_string_release_ex(request, 0);
421422
}
@@ -1314,6 +1315,7 @@ int make_http_soap_request(zval *this_ptr,
13141315
} else {
13151316
zval_ptr_dtor(&params[0]);
13161317
zval_ptr_dtor(&func);
1318+
zval_ptr_dtor(&retval);
13171319
efree(content_encoding);
13181320
zend_string_release_ex(http_headers, 0);
13191321
zend_string_release_ex(http_body, 0);

0 commit comments

Comments
 (0)