Skip to content

Commit 7e956f8

Browse files
authored
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.
1 parent c7db07e commit 7e956f8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ext/soap/soap.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,8 +1336,6 @@ PHP_METHOD(SoapServer, handle)
13361336
}
13371337
}
13381338

1339-
ZVAL_NULL(&retval);
1340-
13411339
if (php_output_start_default() != SUCCESS) {
13421340
php_error_docref(NULL, E_ERROR,"ob_start failed");
13431341
}
@@ -1388,7 +1386,6 @@ PHP_METHOD(SoapServer, handle)
13881386
php_stream_filter_remove(zf, 1);
13891387
}
13901388
} else {
1391-
zval_ptr_dtor(&retval);
13921389
SOAP_SERVER_END_CODE();
13931390
return;
13941391
}
@@ -1434,6 +1431,8 @@ PHP_METHOD(SoapServer, handle)
14341431

14351432
xmlFreeDoc(doc_request);
14361433

1434+
ZVAL_NULL(&retval);
1435+
14371436
if (EG(exception)) {
14381437
if (!zend_is_unwind_exit(EG(exception))) {
14391438
php_output_discard();

0 commit comments

Comments
 (0)