From: Kent Overstreet Date: Wed, 14 Feb 2024 01:26:09 +0000 (-0500) Subject: bcachefs: Fix missing va_end() X-Git-Tag: Ubuntu-6.8.0-17.17~1430^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=816054f40a5fdaaed05d9e7f603d2824eeee7e62;p=mirror_ubuntu-kernels.git bcachefs: Fix missing va_end() Fixes: https://lore.kernel.org/linux-bcachefs/202402131603.E953E2CF@keescook/T/#u Reported-by: coverity scan Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/printbuf.c b/fs/bcachefs/printbuf.c index accf246c3233..b27d22925929 100644 --- a/fs/bcachefs/printbuf.c +++ b/fs/bcachefs/printbuf.c @@ -56,6 +56,7 @@ void bch2_prt_vprintf(struct printbuf *out, const char *fmt, va_list args) va_copy(args2, args); len = vsnprintf(out->buf + out->pos, printbuf_remaining(out), fmt, args2); + va_end(args2); } while (len + 1 >= printbuf_remaining(out) && !bch2_printbuf_make_room(out, len + 1));