summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2013-07-10 21:12:10 -0700
committerPieter Noordhuis <pcnoordhuis@gmail.com>2013-07-10 21:12:10 -0700
commit17d73ef6ad969efb69482e62c479e3c1b4bc1106 (patch)
tree8a764a3b644f98b112a4c4b40233ac7d675f1733
parenta5e0de0d8587c6f42f0df475e01d19be5084a5fd (diff)
parentb15650e13a1ef106bd6a0d8b062360e8a9346ae0 (diff)
Merge pull request #178 from rfuchs/master
va_copy must be followed by va_end
-rw-r--r--sds.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sds.c b/sds.c
index 0af9c67..9226799 100644
--- a/sds.c
+++ b/sds.c
@@ -178,6 +178,7 @@ sds sdscatvprintf(sds s, const char *fmt, va_list ap) {
buf[buflen-2] = '\0';
va_copy(cpy,ap);
vsnprintf(buf, buflen, fmt, cpy);
+ va_end(cpy);
if (buf[buflen-2] != '\0') {
free(buf);
buflen *= 2;