diff options
Diffstat (limited to 'ext/soap/php_sdl.c')
-rw-r--r-- | ext/soap/php_sdl.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index 510d03c551..82fbd3bb20 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -739,7 +739,9 @@ 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); + load_wsdl_ex(this_ptr, struri, &ctx, 0); + zend_try { + schema_pass2(&ctx); n = zend_hash_num_elements(&ctx.services); @@ -1166,6 +1168,12 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri) soap_error0(E_ERROR, "Parsing WSDL: Could not find any usable binding services in WSDL."); } + } zend_catch { + /* Avoid persistent memory leak. */ + zend_hash_destroy(&ctx.docs); + zend_bailout(); + } zend_end_try(); + zend_hash_destroy(&ctx.messages); zend_hash_destroy(&ctx.bindings); zend_hash_destroy(&ctx.portTypes); |