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:
parent
d8313c45a6
commit
ab610366b5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user