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. */
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to