提交 7f5ad018 编写于 作者: H Hari Prasath Gujulan Elango 提交者: 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: NHari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 d8a76d66
......@@ -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;
}
/*=======================================================================
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册