Author: ngie
Date: Thu Aug 17 20:41:28 2017
New Revision: 322636
URL: https://svnweb.freebsd.org/changeset/base/322636

Log:
  Don't leak bpf on early return when YP isn't defined (NIS support)
  
  MFC after:    1 week
  Reported by:  cppcheck

Modified:
  head/usr.sbin/bootparamd/bootparamd/bootparamd.c

Modified: head/usr.sbin/bootparamd/bootparamd/bootparamd.c
==============================================================================
--- head/usr.sbin/bootparamd/bootparamd/bootparamd.c    Thu Aug 17 20:37:01 
2017        (r322635)
+++ head/usr.sbin/bootparamd/bootparamd/bootparamd.c    Thu Aug 17 20:41:28 
2017        (r322636)
@@ -239,6 +239,8 @@ int blen;
         warnx("could not close %s", bootpfile);
       return(1);
 #else
+      if (fclose(bpf))
+        warnx("could not close %s", bootpfile);
       return(0);       /* ENOTSUP */
 #endif
     }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to