summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Fuchs <rfuchs@sipwise.com>2013-07-02 12:41:13 -0400
committerRichard Fuchs <rfuchs@sipwise.com>2013-07-02 12:41:13 -0400
commitb15650e13a1ef106bd6a0d8b062360e8a9346ae0 (patch)
tree42f0c5c124a6d6d51391e2553cf25f24527eee19
parentbcf83543762577a9b0f5625c848b7061cc980f30 (diff)
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;