diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-02-13 20:26:09 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-02-27 13:59:06 -0500 |
commit | 7938950f71cbd7e0789ca17f10a7705556a0467c (patch) | |
tree | 6217000ddbb7433b39aefafa01a5ffda06cddf8b | |
parent | 0b460b33c7720ecea69a62d2b6c0993325ad23f4 (diff) |
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-- | lib/thread_with_file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/thread_with_file.c b/lib/thread_with_file.c index 8b129744a48a..37a1ea22823c 100644 --- a/lib/thread_with_file.c +++ b/lib/thread_with_file.c @@ -118,6 +118,8 @@ static ssize_t darray_vprintf(darray_char *out, gfp_t gfp, const char *fmt, va_l 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; |