提交 af6f9d68 编写于 作者: S Souptick Joarder 提交者: Greg Kroah-Hartman

serial: sunsu: Free memory when probe fails

When su_probe() fails it doesn't free *up and we may have a memory
leak. Fix this by freeing *up before return.
Signed-off-by: NSouptick joarder <jrdr.linux@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 fbb7d2e3
......@@ -1500,6 +1500,7 @@ static int su_probe(struct platform_device *op)
out_unmap:
of_iounmap(&op->resource[0], up->port.membase, up->reg_size);
kfree(up);
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册