Commit 7f5ad018 authored by Hari Prasath Gujulan Elango's avatar Hari Prasath Gujulan Elango Committed by Greg Kroah-Hartman

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: default avatarHari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d8a76d66
...@@ -422,8 +422,12 @@ void dgnc_tty_uninit(struct dgnc_board *brd) ...@@ -422,8 +422,12 @@ void dgnc_tty_uninit(struct dgnc_board *brd)
kfree(brd->SerialDriver.ttys); kfree(brd->SerialDriver.ttys);
brd->SerialDriver.ttys = NULL; brd->SerialDriver.ttys = NULL;
kfree(brd->SerialDriver.termios);
brd->SerialDriver.termios = NULL;
kfree(brd->PrintDriver.ttys); kfree(brd->PrintDriver.ttys);
brd->PrintDriver.ttys = NULL; brd->PrintDriver.ttys = NULL;
kfree(brd->PrintDriver.termios);
brd->PrintDriver.termios = NULL;
} }
/*======================================================================= /*=======================================================================
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment