提交 5693ce6f 编写于 作者: C Cornelia Huck 提交者: Martin Schwidefsky

[S390] cio: avoid memory leak on error in css_alloc_subchannel().

sch->lock has been allocated in cio_validate_subchannel(), it must be
freed if cio_modify() fails.
Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 ac078602
......@@ -79,6 +79,7 @@ css_alloc_subchannel(struct subchannel_id schid)
sch->schib.pmcw.intparm = (__u32)(unsigned long)sch;
ret = cio_modify(sch);
if (ret) {
kfree(sch->lock);
kfree(sch);
return ERR_PTR(ret);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册