From 51d76c346e1a22bc711c74a231b58a495f2fb42c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 2 Feb 2021 10:05:35 +0100 Subject: Fix persistent leak on load_wsdl_ex failure Move the load_wsdl_ex call into the zend_try that destroys the docs hash table. The wsdl will be inserted into docs early on, and will thus be released on subsequent bailout. --- ext/soap/php_sdl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ext/soap/php_sdl.c') diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index 8d5e7335e1..26a23f57db 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -741,9 +741,8 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri) zend_hash_init(&ctx.portTypes, 0, NULL, NULL, 0); zend_hash_init(&ctx.services, 0, NULL, NULL, 0); - load_wsdl_ex(this_ptr, struri, &ctx, 0); zend_try { - + load_wsdl_ex(this_ptr, struri, &ctx, 0); schema_pass2(&ctx); n = zend_hash_num_elements(&ctx.services); -- cgit v1.2.1