summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaks Mishin <[email protected]>2024-09-18 11:58:07 +0300
committerAaron Merey <[email protected]>2024-09-20 11:51:28 -0400
commitb47bdee08a16078c8a4d81b440f99f630e3e5631 (patch)
tree694b892e6b70d6d13ec8ed486a93d4cdbf8c9d32
parent30df1adeab5a9285830042b446a828319c6aa743 (diff)
elflint: Fix memory leak in check_gnu_hash function
Dynamic memory, referenced by 'collected', is allocated at elflint.c:2235 and lost at elflint.c:2296. Found by RASU JSC with SVACE. Signed-off-by: Maks Mishin <[email protected]>
-rw-r--r--src/elflint.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/elflint.c b/src/elflint.c
index e56e1465..cdc6108d 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -2293,6 +2293,7 @@ section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n"),
section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n"),
idx, section_name (ebl, idx), symidx,
cnt - (4 + bitmask_words));
+ free (collected.p32);
return;
}
if (classbits == 32)