]> git.baikalelectronics.ru Git - kernel.git/commit
bpftool: Properly close va_list 'ap' by va_end() on error
authorGu Shengxian <gushengxian@yulong.com>
Tue, 6 Jul 2021 01:35:43 +0000 (18:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jul 2021 12:35:15 +0000 (14:35 +0200)
commit199d6df6edf2d27f6ebaefb9ee722a5f4c6b0dd9
treec8697b5f9d7cf2679864c40a1ea12f6ba4eb7727
parent8e9608f654ade09fa8a4a534bfdb78a4715e68fa
bpftool: Properly close va_list 'ap' by va_end() on error

commit bc832065b60f973771ff3e657214bb21b559833c upstream.

va_list 'ap' was opened but not closed by va_end() in error case. It should
be closed by va_end() before the return.

Fixes: 4f34379a7566 ("tools: bpftool: Fix json dump crash on powerpc")
Signed-off-by: Gu Shengxian <gushengxian@yulong.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/bpf/20210706013543.671114-1-gushengxian507419@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/bpf/bpftool/jit_disasm.c