about summary refs log tree commit diff
path: root/timezone/zdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'timezone/zdump.c')
-rw-r--r--timezone/zdump.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/timezone/zdump.c b/timezone/zdump.c
index 608f288691..0fc8ced96a 100644
--- a/timezone/zdump.c
+++ b/timezone/zdump.c
@@ -807,8 +807,10 @@ my_snprintf(char *s, size_t size, char const *format, ...)
     arglen = strlen(arg);
   } else {
     n = vsprintf(buf, format, args);
-    if (n < 0)
+    if (n < 0) {
+      va_end(args);
       return n;
+    }
     arg = buf;
     arglen = n;
   }