All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: dgnc: free memory allocated
@ 2015-06-18 13:27 Gujulan Elango, Hari Prasath (H.)
  2015-06-22 17:15 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Gujulan Elango, Hari Prasath (H.) @ 2015-06-18 13:27 UTC (permalink / raw)
  To: gregkh
  Cc: lidza.louina, devel, driverdev-devel, Gujulan Elango, Hari Prasath (H.)

From: Hari Prasath Gujulan Elango <hgujulan@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@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
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-23 12:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-18 13:27 [PATCH] staging: dgnc: free memory allocated Gujulan Elango, Hari Prasath (H.)
2015-06-22 17:15 ` Dan Carpenter
2015-06-23 12:35   ` Gujulan Elango, Hari Prasath (H.)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.