btrfs-progs: properly close va_copy in fmt_set_unquoted()

Reported by 'gcc -fanalyzer':
common/format-output.c:168:1: warning: missing call to ‘va_end’ [-Wanalyzer-va-list-leak]

There's a temporary va_list used infmt_set_unquoted() but va_copy() must
be paired with va_end(), which is missing.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2024-04-04 00:35:40 +02:00
parent 2cd46f3935
commit 0e3614e8f9
1 changed files with 4 additions and 1 deletions

View File

@ -161,8 +161,11 @@ static bool fmt_set_unquoted(struct format_ctx *fctx, const struct rowspec *row,
va_copy(tmpargs, args);
uuid = va_arg(tmpargs, const u8 *);
if (uuid_is_null(uuid))
if (uuid_is_null(uuid)) {
va_end(tmpargs);
return true;
}
va_end(tmpargs);
}
return false;
}