Skip to content

Commit

Permalink
add missing call to va_end() for copied va_list
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Max authored and Lukas Fleischer committed Nov 6, 2023
1 parent daa7da0 commit f6090c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/strings.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f6090c7

Please sign in to comment.