objtool: Fix a memory leak bug
PATCH 1/1 objtool: Fix a memory leak bug
Fix the following cppcheck warnings:
tools/objtool/check.c(1102): error: Memory leak: orig_alt_group.
Reported-by Abaci Robot <[email protected]>
Signed-off-by Jiapeng Chong <[email protected]>
--- tools/objtool/check.c | 1 + 1 file changed, 1 insertion(+)
tools/objtool/check.c +1 -0
@@ -1099,6 +1099,7 @@ static int handle_group_alt(struct objtool_file *file, sizeof(struct cfi_state *));if (!orig_alt_group->cfi) {WARN ("calloc failed" ); +free (orig_alt_group);return -1 ; }
Signature · 1 line
1.8.3.1
Quoted 6 lines · Jiapeng Chong
Fix the following cppcheck warnings:
tools/objtool/check.c(1102): error: Memory leak:
orig_alt_group.Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>
Hi Jiapeng,
Objtool is a short-running process which exits immediately on error, so we don't worry about memory leaks.
Signature · 1 line
Josh