Don't leak fp in case where fo_ioctl() returns an error.

Reported by:	C Turt <ecturt@gmail.com>
MFC after:	1 week
This commit is contained in:
Dmitry Chagin 2016-05-24 05:29:41 +00:00
parent d8313c45a6
commit ab610366b5

View File

@ -977,7 +977,7 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
error = fo_ioctl(fp, TIOCGETD, (caddr_t)&bsd_line,
td->td_ucred, td);
if (error)
return (error);
break;
switch (bsd_line) {
case TTYDISC:
linux_line = LINUX_N_TTY;