From 497e8a6bf0e7f2cee9dbe94cbd45fe91a051ff56 Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Mon, 9 Oct 2017 18:00:40 +0000 Subject: [PATCH] cxgbetool(8): Do not close uninitialized fd on malloc failure. MFC after: 1 week Sponsored by: Chelsio Communications --- usr.sbin/cxgbetool/cxgbetool.c | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.sbin/cxgbetool/cxgbetool.c b/usr.sbin/cxgbetool/cxgbetool.c index f80e59fe6667..4b8dc0f709af 100644 --- a/usr.sbin/cxgbetool/cxgbetool.c +++ b/usr.sbin/cxgbetool/cxgbetool.c @@ -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); }