Commit fdae6373 authored by Thomas Jarosch's avatar Thomas Jarosch Committed by Arnaldo Carvalho de Melo

perf header: Fix memory leak for the "Not caching a kptr_restrict'ed /proc/kallsyms" case

cppcheck reported:
[util/header.c:316]: (error) Memory leak: filename
[util/header.c:316]: (error) Memory leak: linkname
Signed-off-by: default avatarThomas Jarosch <thomas.jarosch@intra2net.com>
Link: http://lkml.kernel.org/r/9377388.0eFDp53iW6@stormSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 0b9e01a4
......@@ -313,7 +313,8 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir,
if (is_kallsyms) {
if (symbol_conf.kptr_restrict) {
pr_debug("Not caching a kptr_restrict'ed /proc/kallsyms\n");
return 0;
err = 0;
goto out_free;
}
realname = (char *) name;
} else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment