diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 72c1e34a027..0545bddf10e 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2954,7 +2954,8 @@ PHP_METHOD(SoapClient, __getFunctions) array_init(return_value); ZEND_HASH_FOREACH_PTR(&sdl->functions, function) { function_to_string(function, &buf); - add_next_index_str(return_value, buf.s); + add_next_index_stringl(return_value, buf.s->val, buf.s->len); + smart_str_free(&buf); } ZEND_HASH_FOREACH_END(); } }