Skip to content
Snippets Groups Projects
Commit 4b60a565 authored by Elena Salomatkina's avatar Elena Salomatkina Committed by Masahiro Yamada
Browse files

sumversion: Fix a memory leak in get_src_version()


strsep() modifies its first argument - buf.
An invalid pointer will be passed to the free() function.
Make the pointer passed to free() match the return value of
read_text_file().

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 9413e764 ("kbuild: split the second line of *.mod into *.usyms")
Signed-off-by: default avatarElena Salomatkina <esalomatkina@ispras.ru>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 42f7652d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment