]> granicus.if.org Git - php/commitdiff
Buffer has to be reallocated on each loop iteration
authorDmitry Stogov <dmitry@zend.com>
Thu, 15 May 2014 18:51:46 +0000 (22:51 +0400)
committerDmitry Stogov <dmitry@zend.com>
Thu, 15 May 2014 18:51:46 +0000 (22:51 +0400)
ext/soap/soap.c

index 570b1ad6402bc055b7e9caefe2108d6f2e5e5d20..72c1e34a027ccc142974f89ee81927f61cdabd3e 100644 (file)
@@ -2981,7 +2981,8 @@ PHP_METHOD(SoapClient, __getTypes)
                if (sdl->types) {
                        ZEND_HASH_FOREACH_PTR(sdl->types, type) {
                                type_to_string(type, &buf, 0);
-                               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();
                }
        }