[PATCH] staging: dgnc: free memory allocated
Gujulan Elango, Hari Prasath (H.)
hgujulan at visteon.com
Thu Jun 18 13:27:28 UTC 2015
From: Hari Prasath Gujulan Elango <hgujulan at visteon.com>
The memory allocated in dgnc_tty_register() for two objects is not freed
anywhere.This patch addresses this by freeing the memory in
dgnc_tty_uninit.
Signed-off-by: Hari Prasath Gujulan Elango <hgujulan at visteon.com>
---
drivers/staging/dgnc/dgnc_tty.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 5c5c4b7..fbfe79a 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -422,8 +422,12 @@ void dgnc_tty_uninit(struct dgnc_board *brd)
kfree(brd->SerialDriver.ttys);
brd->SerialDriver.ttys = NULL;
+ kfree(brd->SerialDriver.termios);
+ brd->SerialDriver.termios = NULL;
kfree(brd->PrintDriver.ttys);
brd->PrintDriver.ttys = NULL;
+ kfree(brd->PrintDriver.termios);
+ brd->PrintDriver.termios = NULL;
}
/*=======================================================================
--
1.9.1
More information about the devel
mailing list