提交 fdae6373 编写于 作者: T Thomas Jarosch 提交者: 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: NThomas Jarosch <thomas.jarosch@intra2net.com>
Link: http://lkml.kernel.org/r/9377388.0eFDp53iW6@stormSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册