Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Feb 2016 20:45:07 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r296143 - stable/9/sys/dev/filemon
Message-ID:  <201602272045.u1RKj7UP031234@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Sat Feb 27 20:45:07 2016
New Revision: 296143
URL: https://svnweb.freebsd.org/changeset/base/296143

Log:
  MFC r294933:
  
    Drop any previous fd when setting a new one.

Modified:
  stable/9/sys/dev/filemon/filemon.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/filemon/filemon.c
==============================================================================
--- stable/9/sys/dev/filemon/filemon.c	Sat Feb 27 20:39:36 2016	(r296142)
+++ stable/9/sys/dev/filemon/filemon.c	Sat Feb 27 20:45:07 2016	(r296143)
@@ -185,6 +185,9 @@ filemon_ioctl(struct cdev *dev, u_long c
 	switch (cmd) {
 	/* Set the output file descriptor. */
 	case FILEMON_SET_FD:
+		if (filemon->fp != NULL)
+			fdrop(filemon->fp, td);
+
 #if __FreeBSD_version < 900041
 #define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), (a3))
 #else



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