summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;