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

Commit 1dae42bf authored by J Freyensee's avatar J Freyensee Committed by Greg Kroah-Hartman
Browse files

pti: ENXIO error case memory leak PTI fix.



This patch fixes a memory leak that can occur in the error case
ENXIO is returned in the pti_tty_install() routine.

Signed-off-by: default avatarJ Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 29021bcc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -476,8 +476,10 @@ static int pti_tty_install(struct tty_driver *driver, struct tty_struct *tty)
		else
			pti_tty_data->mc = pti_request_masterchannel(2);

		if (pti_tty_data->mc == NULL)
		if (pti_tty_data->mc == NULL) {
			kfree(pti_tty_data);
			return -ENXIO;
		}
		tty->driver_data = pti_tty_data;
	}