summaryrefslogtreecommitdiffstats
path: root/drivers/staging/dgnc
diff options
context:
space:
mode:
authorHari Prasath Gujulan Elango2015-06-18 15:27:28 +0200
committerGreg Kroah-Hartman2015-06-19 06:15:17 +0200
commit7f5ad0181621b08f68e2d4b772f410aec580642b (patch)
treee9ea06c0ae1b180c637d036cf3af85ed57e49daf /drivers/staging/dgnc
parentstaging: dgnc: fix typo in comments secion (diff)
downloadkernel-qcow2-linux-7f5ad0181621b08f68e2d4b772f410aec580642b.tar.gz
kernel-qcow2-linux-7f5ad0181621b08f68e2d4b772f410aec580642b.tar.xz
kernel-qcow2-linux-7f5ad0181621b08f68e2d4b772f410aec580642b.zip
staging: dgnc: free memory allocated
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@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgnc')
-rw-r--r--drivers/staging/dgnc/dgnc_tty.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 5c5c4b774256..fbfe79a70263 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;
}
/*=======================================================================