aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <max@mxzero.net>2023-11-06 16:16:37 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2023-11-06 15:42:59 -0500
commitf6090c7e17b5a7801a32695b6b0b2e6959386881 (patch)
tree13278e639e9c37fb0a7ff13306ac29b8f95242cc
parentdaa7da0d0bb5c2ce751231b8f679aff9ca33425d (diff)
downloadcalcurse-f6090c7e17b5a7801a32695b6b0b2e6959386881.tar.gz
calcurse-f6090c7e17b5a7801a32695b6b0b2e6959386881.zip
add missing call to `va_end()` for copied `va_list`
The man page stdarg(3) states that each invocation of `va_copy()` must be matched by a corresponding invocation of `va_end()` in the same function. Signed-off-by: Max <max@mxzero.net> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
-rw-r--r--src/strings.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/strings.c b/src/strings.c
index 45c9310..ed90bc7 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -85,6 +85,7 @@ int string_vcatf(struct string *sb, const char *format, va_list ap)
ap2);
}
sb->len += n;
+ va_end(ap2);
return n;
}