svn commit: r300569 - head/sys/compat/linux

Dmitry Chagin dchagin at FreeBSD.org
Tue May 24 05:29:43 UTC 2016


Author: dchagin
Date: Tue May 24 05:29:41 2016
New Revision: 300569
URL: https://svnweb.freebsd.org/changeset/base/300569

Log:
  Don't leak fp in case where fo_ioctl() returns an error.
  
  Reported by:	C Turt <ecturt at gmail.com>
  MFC after:	1 week

Modified:
  head/sys/compat/linux/linux_ioctl.c

Modified: head/sys/compat/linux/linux_ioctl.c
==============================================================================
--- head/sys/compat/linux/linux_ioctl.c	Tue May 24 05:26:52 2016	(r300568)
+++ head/sys/compat/linux/linux_ioctl.c	Tue May 24 05:29:41 2016	(r300569)
@@ -977,7 +977,7 @@ linux_ioctl_termio(struct thread *td, st
 		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;


More information about the svn-src-head mailing list