lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210702031327.559429-1-gushengxian507419@gmail.com>
Date:   Thu,  1 Jul 2021 20:13:27 -0700
From:   gushengxian <gushengxian507419@...il.com>
To:     jpoimboe@...hat.com, peterz@...radead.org
Cc:     linux-kernel@...r.kernel.org, gushengxian <gushengxian@...ong.com>
Subject: [PATCH] objtool: avoid Memory leak: orig_alt_group

From: gushengxian <gushengxian@...ong.com>

free(orig_alt_group) should be added in order to avoid memery leak.
Reported by cppcheck.

Signed-off-by: gushengxian <gushengxian@...ong.com>
---
 tools/objtool/check.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index e5947fbb9e7a..deb48b1bc16d 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1097,6 +1097,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;
 	}
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ