提交 f1dd9375 编写于 作者: Z Zhang Ming 提交者: Zheng Zengkai

arm64/mpam: fix a memleak in add_schema

openEuler inclusion
category: bugfix
bugzilla: 48265
CVE: NA
Reference: https://gitee.com/openeuler/kernel/issues/I3BPPX

---------------------------------------------------

The default branch in switch will not run at present,
but there may be related extensions in the future,
which may lead to memory leakage.

Signed-off-by: Zhang Ming <154842638(a)qq.com>
Reported-by: Wang ShaoBo <bobo.shaobowang(a)huawei.com>
Suggested-by: Jian Cheng <cj.chengjian(a)huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
[Zheng Zengkai: adjust commit message]
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 0a960e73
......@@ -74,6 +74,7 @@ static int add_schema(enum resctrl_conf_type t, struct resctrl_resource *r)
suffix = "";
break;
default:
kfree(s);
return -EINVAL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册