summaryrefslogtreecommitdiff
path: root/tools/objtool/include
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@kernel.org>2026-04-02 17:35:53 -0700
committerJosh Poimboeuf <jpoimboe@kernel.org>2026-05-04 21:16:01 -0700
commit479ac5260e7ea717f1ea7b1e74dfe807d3b46eda (patch)
tree3ade04d64c28637410059e2196a133b0592078c2 /tools/objtool/include
parent98377f3ba7c02d6eb34e203c9f9823bc62b0d231 (diff)
objtool/klp: Fix XXH3 state memory leak
The XXH3 state allocated in checksum_init() is never freed. Free it in checksum_finish(). Acked-by: Song Liu <song@kernel.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'tools/objtool/include')
-rw-r--r--tools/objtool/include/objtool/checksum.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/objtool/include/objtool/checksum.h b/tools/objtool/include/objtool/checksum.h
index 7fe21608722a..0bd16fe9168b 100644
--- a/tools/objtool/include/objtool/checksum.h
+++ b/tools/objtool/include/objtool/checksum.h
@@ -26,6 +26,7 @@ static inline void checksum_finish(struct symbol *func)
{
if (func && func->csum.state) {
func->csum.checksum = XXH3_64bits_digest(func->csum.state);
+ XXH3_freeState(func->csum.state);
func->csum.state = NULL;
}
}