Skip to content

Commit 476b9ed

Browse files
committed
Fix memory leaks in php_http.c when call_user_function() fails
retval can be refcounted but is not destroyed.
1 parent 910aeaa commit 476b9ed

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)