aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-02-13 20:26:09 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-03-13 21:22:18 -0400
commit6b33312925a77c24905cef1356c2b63a6149d8a1 (patch)
tree2dda490f8e2b482ae1ad80b2e39d8060dee2481a
parent658a1e42ce00b487909cdf91247e69c333b2c37a (diff)
downloadvfs-6b33312925a77c24905cef1356c2b63a6149d8a1.tar.gz
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 <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/thread_with_file.c2
1 files changed, 2 insertions, 0 deletions
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;