com php-src: Buffer has to be reallocated on each loop iteration: ext/soap/soap.c
| From: | Dmitry Stogov | Date: | Thu, 15 May 2014 18:58:58 +0000 |
| Subject: | com php-src: Buffer has to be reallocated on each loop iteration: ext/soap/soap.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-78394@lists.php.net to get a copy of this message | ||
Commit: f0da988282b2c87facd264eaceed0a436b1694f7
Author: Dmitry Stogov <dmitry@zend.com> Thu, 15 May 2014 22:58:58 +0400
Parents: ce8518e6528b5b0c01b369735253d2839be04ce3
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f0da988282b2c87facd264eaceed0a436b1694f7
Log:
Buffer has to be reallocated on each loop iteration
Changed paths:
M ext/soap/soap.c
Diff:
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 72c1e34..0545bdd 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();
}
}