diff options
author | Souptick Joarder <jrdr.linux@gmail.com> | 2016-11-14 13:37:36 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-16 10:57:25 +0100 |
commit | fbb7d2e3a9cc07dd56a9c4d337352b3b1cb34c89 (patch) | |
tree | 97cf2b25ffad5828583a0bb44cb4afb815ad2a5e /drivers/tty/serial/sunhv.c | |
parent | vt: fix Scroll Lock LED trigger name (diff) | |
download | linux-fbb7d2e3a9cc07dd56a9c4d337352b3b1cb34c89.tar.xz linux-fbb7d2e3a9cc07dd56a9c4d337352b3b1cb34c89.zip |
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: Souptick joarder <jrdr.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sunhv.c')
-rw-r--r-- | drivers/tty/serial/sunhv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c index 4e603d060e80..99ef5c6e4766 100644 --- a/drivers/tty/serial/sunhv.c +++ b/drivers/tty/serial/sunhv.c @@ -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; |