From 7e956f879e77a0d6ff08521f69d7758b93045293 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Sun, 25 May 2025 22:15:31 +0100 Subject: [PATCH] ext/soap: SoapServer::handle() reduce retval scope. (#18657) might have been a relic of past modifications, but pushing it down to the actual first case of error path. --- ext/soap/soap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ext/soap/soap.c b/ext/soap/soap.c index ef00324d8afef..1084f9c691cf7 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -1336,8 +1336,6 @@ PHP_METHOD(SoapServer, handle) } } - ZVAL_NULL(&retval); - if (php_output_start_default() != SUCCESS) { php_error_docref(NULL, E_ERROR,"ob_start failed"); } @@ -1388,7 +1386,6 @@ PHP_METHOD(SoapServer, handle) php_stream_filter_remove(zf, 1); } } else { - zval_ptr_dtor(&retval); SOAP_SERVER_END_CODE(); return; } @@ -1434,6 +1431,8 @@ PHP_METHOD(SoapServer, handle) xmlFreeDoc(doc_request); + ZVAL_NULL(&retval); + if (EG(exception)) { if (!zend_is_unwind_exit(EG(exception))) { php_output_discard();