]> granicus.if.org Git - php/commitdiff
Fix persistent leak on load_wsdl_ex failure
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 2 Feb 2021 09:05:35 +0000 (10:05 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 2 Feb 2021 09:05:35 +0000 (10:05 +0100)
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

index 8d5e7335e1be69634d5fc4bfdd6189bfd16c6e40..26a23f57db2387dd3f3a79d0a8e422b6d9b647a9 100644 (file)
@@ -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);