]> git.baikalelectronics.ru Git - kernel.git/commit
tools, bpftool: Fix memory leak in codegen error cases
authorTobias Klauser <tklauser@distanz.ch>
Wed, 10 Jun 2020 13:08:04 +0000 (15:08 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 11 Jun 2020 14:08:48 +0000 (16:08 +0200)
commitd4b30e574f4ad681d72823edf5497fb87e6ff3c7
treec8daf92bdcf0d938dc3d3582c5116552315af6af
parent44294c20abf4e481f1f936ce5e03063b5a020ed8
tools, bpftool: Fix memory leak in codegen error cases

Free the memory allocated for the template on error paths in function
codegen.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200610130804.21423-1-tklauser@distanz.ch
tools/bpf/bpftool/gen.c