Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Dec 2010 01:35:19 +0000 (UTC)
From:      Kevin Lo <kevlo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r216285 - head/usr.sbin/cxgbtool
Message-ID:  <201012080135.oB81ZJZt086340@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevlo
Date: Wed Dec  8 01:35:19 2010
New Revision: 216285
URL: http://svn.freebsd.org/changeset/base/216285

Log:
  Closing file descriptors when it's done
  
  Reviewed by:	np

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

Modified: head/usr.sbin/cxgbtool/cxgbtool.c
==============================================================================
--- head/usr.sbin/cxgbtool/cxgbtool.c	Wed Dec  8 01:24:05 2010	(r216284)
+++ head/usr.sbin/cxgbtool/cxgbtool.c	Wed Dec  8 01:35:19 2010	(r216285)
@@ -1014,6 +1014,8 @@ load_fw(int argc, char *argv[], int star
 	op.len = len;
 	if (doit(iff_name, CHELSIO_LOAD_FW, &op) < 0)
 		err(1, "load firmware");
+
+	close(fd);
 	return 0;
 }
 
@@ -1048,6 +1050,7 @@ load_boot(int argc, char *argv[], int st
 	if (doit(iff_name, CHELSIO_LOAD_BOOT, &op) < 0)
 		err(1, "load boot image");
 
+	close(fd);
 	return 0;
 }
 



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