[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1615279576-100603-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Date: Tue, 9 Mar 2021 16:46:16 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: jpoimboe@...hat.com
Cc: peterz@...radead.org, nathan@...nel.org, ndesaulniers@...gle.com,
linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Subject: [PATCH] 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 <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
tools/objtool/check.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 068cdb4..bfa7c31 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -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;
}
--
1.8.3.1
Powered by blists - more mailing lists