From: Kent Overstreet Date: Wed, 14 Feb 2024 01:26:09 +0000 (-0500) Subject: bcachefs: thread_with_file: Fix missing va_end() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6b33312925a77c24905cef1356c2b63a6149d8a1;p=linux.git bcachefs: thread_with_file: 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/thread_with_file.c b/fs/bcachefs/thread_with_file.c index d61ede0bda40c..60d701f33f85b 100644 --- a/fs/bcachefs/thread_with_file.c +++ b/fs/bcachefs/thread_with_file.c @@ -384,6 +384,8 @@ static ssize_t bch2_darray_vprintf(darray_char *out, gfp_t gfp, const char *fmt, va_copy(args2, args); len = vsnprintf(out->data + out->nr, darray_room(*out), fmt, args2); + va_end(args2); + if (len + 1 <= darray_room(*out)) { out->nr += len; return len;