svn commit: r301432 - stable/9/sys/compat/linux

Dmitry Chagin dchagin at FreeBSD.org
Sun Jun 5 07:45:57 UTC 2016


Author: dchagin
Date: Sun Jun  5 07:45:55 2016
New Revision: 301432
URL: https://svnweb.freebsd.org/changeset/base/301432

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

Modified:
  stable/9/sys/compat/linux/linux_ioctl.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/compat/linux/linux_ioctl.c
==============================================================================
--- stable/9/sys/compat/linux/linux_ioctl.c	Sun Jun  5 07:43:20 2016	(r301431)
+++ stable/9/sys/compat/linux/linux_ioctl.c	Sun Jun  5 07:45:55 2016	(r301432)
@@ -974,7 +974,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-all mailing list