Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 May 2016 05:29:42 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300569 - head/sys/compat/linux
Message-ID:  <201605240529.u4O5Tg2k041893@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605240529.u4O5Tg2k041893>