Skip to content

Commit 51d76c3

Browse files
committed
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.
1 parent 675a9b2 commit 51d76c3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ext/soap/php_sdl.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,9 +741,8 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri)
741741
zend_hash_init(&ctx.portTypes, 0, NULL, NULL, 0);
742742
zend_hash_init(&ctx.services, 0, NULL, NULL, 0);
743743

744-
load_wsdl_ex(this_ptr, struri, &ctx, 0);
745744
zend_try {
746-
745+
load_wsdl_ex(this_ptr, struri, &ctx, 0);
747746
schema_pass2(&ctx);
748747

749748
n = zend_hash_num_elements(&ctx.services);

0 commit comments

Comments
 (0)