From: Jes Sorensen Date: Wed, 2 Nov 2011 21:08:34 +0000 (+1100) Subject: ahci_enumerate_ports(): Don't close fd that failed to open X-Git-Tag: mdadm-3.2.3~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4dab422a6537ce38b7817fbe7eec21940f41c463;p=thirdparty%2Fmdadm.git ahci_enumerate_ports(): Don't close fd that failed to open Signed-off-by: Jes Sorensen Signed-off-by: NeilBrown --- diff --git a/super-intel.c b/super-intel.c index 0193fe7f..b583b35c 100644 --- a/super-intel.c +++ b/super-intel.c @@ -1572,8 +1572,8 @@ static int ahci_enumerate_ports(const char *hba_path, int port_count, int host_b printf(" (%.*s)\n", MAX_RAID_SERIAL_LEN, buf); else printf(" ()\n"); + close(fd); } - close(fd); free(path); path = NULL; }