Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Aug 2017 20:41:28 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r322636 - head/usr.sbin/bootparamd/bootparamd
Message-ID:  <201708172041.v7HKfSZw028253@repo.freebsd.org>

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



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