Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;
}

/*=======================================================================