From: Josh Poimboeuf Date: Fri, 3 Apr 2026 00:35:53 +0000 (-0700) Subject: objtool/klp: Fix XXH3 state memory leak X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=479ac5260e7ea717f1ea7b1e74dfe807d3b46eda;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Miroslav Benes Signed-off-by: Josh Poimboeuf --- diff --git a/tools/objtool/include/objtool/checksum.h b/tools/objtool/include/objtool/checksum.h index 7fe21608722ac..0bd16fe9168bf 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; } }