svn commit: r324443 - head/usr.sbin/cxgbetool

Navdeep Parhar np at FreeBSD.org
Mon Oct 9 18:00:42 UTC 2017


Author: np
Date: Mon Oct  9 18:00:40 2017
New Revision: 324443
URL: https://svnweb.freebsd.org/changeset/base/324443

Log:
  cxgbetool(8): Do not close uninitialized fd on malloc failure.
  
  MFC after:	1 week
  Sponsored by:	Chelsio Communications

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

Modified: head/usr.sbin/cxgbetool/cxgbetool.c
==============================================================================
--- head/usr.sbin/cxgbetool/cxgbetool.c	Mon Oct  9 17:12:02 2017	(r324442)
+++ head/usr.sbin/cxgbetool/cxgbetool.c	Mon Oct  9 18:00:40 2017	(r324443)
@@ -1901,7 +1901,6 @@ dumpstate(int argc, const char *argv[])
 	dump.len = 8 * 1024 * 1024;
 	dump.data = malloc(dump.len);
 	if (dump.data == NULL) {
-		close(fd);
 		return (ENOMEM);
 	}
 


More information about the svn-src-head mailing list