linux/tools/objtool
Miaoqian Lin d131718d9c objtool: Fix memory leak in create_static_call_sections()
[ Upstream commit 3da73f1023 ]

strdup() allocates memory for key_name. We need to release the memory in
the following error paths. Add free() to avoid memory leak.

Fixes: 1e7e478838 ("x86/static_call: Add inline static call implementation for x86-64")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20221205080642.558583-1-linmq006@gmail.com
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2023-03-11 13:50:21 +01:00
..
arch powerpc updates for 6.2 2022-12-19 07:13:33 -06:00
Documentation objtool: Update documentation 2022-04-22 12:32:05 +02:00
include/objtool powerpc updates for 6.2 2022-12-19 07:13:33 -06:00
.gitignore objtool: Rework header include paths 2021-01-13 18:13:14 -06:00
Build objtool: Ditch subcommands 2022-04-22 12:32:01 +02:00
builtin-check.c powerpc updates for 6.2 2022-12-19 07:13:33 -06:00
check.c objtool: Fix memory leak in create_static_call_sections() 2023-03-11 13:50:21 +01:00
elf.c powerpc updates for 6.2 2022-12-19 07:13:33 -06:00
Makefile Kbuild updates for v5.19 2022-05-26 12:09:50 -07:00
objtool.c objtool: Add .call_sites section 2022-10-17 16:41:07 +02:00
orc_dump.c objtool: Use target file endianness instead of a compiled constant 2022-11-18 19:00:15 +11:00
orc_gen.c objtool: Use target file endianness instead of a compiled constant 2022-11-18 19:00:15 +11:00
special.c objtool: Use target file endianness instead of a compiled constant 2022-11-18 19:00:15 +11:00
sync-check.sh Merge branch 'x86/cpu' into WIP.x86/core, to merge the NOP changes & resolve a semantic conflict 2021-04-02 12:36:30 +02:00
weak.c objtool: Ditch subcommands 2022-04-22 12:32:01 +02:00