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

serial: sunhv: Free memory when remove() is called

In each call to hv_remove(), con_read_page and con_write_page is not
getting freed and lead to memory leakage. Fix this by freeing both
pointers in hv_remove().
Signed-off-by: NSouptick joarder <jrdr.linux@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 31b5929d
......@@ -598,7 +598,8 @@ static int hv_remove(struct platform_device *dev)
uart_remove_one_port(&sunhv_reg, port);
sunserial_unregister_minors(&sunhv_reg, 1);
kfree(con_read_page);
kfree(con_write_page);
kfree(port);
sunhv_port = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册