svn commit: r294949 - head/sys/dev/filemon

Bryan Drewery bdrewery at FreeBSD.org
Wed Jan 27 21:12:20 UTC 2016


Author: bdrewery
Date: Wed Jan 27 21:12:18 2016
New Revision: 294949
URL: https://svnweb.freebsd.org/changeset/base/294949

Log:
  filemon_ioctl: Handle error from devfs_get_cdevpriv(9).
  
  MFC after:	2 weeks
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/sys/dev/filemon/filemon.c

Modified: head/sys/dev/filemon/filemon.c
==============================================================================
--- head/sys/dev/filemon/filemon.c	Wed Jan 27 21:12:02 2016	(r294948)
+++ head/sys/dev/filemon/filemon.c	Wed Jan 27 21:12:18 2016	(r294949)
@@ -143,7 +143,8 @@ filemon_ioctl(struct cdev *dev, u_long c
 	cap_rights_t rights;
 #endif
 
-	devfs_get_cdevpriv((void **) &filemon);
+	if ((error = devfs_get_cdevpriv((void **) &filemon)) != 0)
+		return (error);
 
 	switch (cmd) {
 	/* Set the output file descriptor. */


More information about the svn-src-head mailing list