diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-02-13 20:26:09 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-13 21:22:18 -0400 |
commit | 6b33312925a77c24905cef1356c2b63a6149d8a1 (patch) | |
tree | 2dda490f8e2b482ae1ad80b2e39d8060dee2481a /fs | |
parent | 658a1e42ce00b487909cdf91247e69c333b2c37a (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/thread_with_file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/thread_with_file.c b/fs/bcachefs/thread_with_file.c index d61ede0bda40..60d701f33f85 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; |