mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 01:32:21 +02:00
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>
This commit is contained in:
parent
98377f3ba7
commit
479ac5260e
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user