projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31b5929
)
serial: sunhv: Free memory when remove() is called
author
Souptick Joarder
<jrdr.linux@gmail.com>
Mon, 14 Nov 2016 12:37:36 +0000
(18:07 +0530)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 16 Nov 2016 09:57:25 +0000
(10:57 +0100)
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>
drivers/tty/serial/sunhv.c
patch
|
blob
|
history
diff --git
a/drivers/tty/serial/sunhv.c
b/drivers/tty/serial/sunhv.c
index
4e603d0
..
99ef5c6
100644
(file)
--- 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;