[PATCH] Coverity: Resource leak: close fd before return

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 Grow.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Grow.c b/Grow.c
index a4be7e7..30c5fa9 100644
--- a/Grow.c
+++ b/Grow.c
@@ -242,6 +242,7 @@ int Grow_Add_device(char *devname, int fd, char *newdev)
 		if (st->ss->load_super(st, fd2, NULL)) {
 			pr_err("cannot find super block on %s\n", dv);
 			close(fd);
+			close(fd2);
 			return 1;
 		}
 		info.array.raid_disks = nd+1;
-- 
2.13.7

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux