[PATCH 1/2] Coverity: 289704: Fix resource leak (bitmap_fd not closed)

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

 



Signed-off-by: Wol <anthony@xxxxxxxxxxxxxxx>
---
 Grow.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Grow.c b/Grow.c
index 30c5fa9..bbfbaf4 100644
--- a/Grow.c
+++ b/Grow.c
@@ -516,6 +516,7 @@ int Grow_addbitmap(char *devname, int fd, struct context *c, struct shape *s)
 				devname, strerror(err));
 			return 1;
 		}
+		close( bitmap_fd);
 	}
 
 	return 0;
-- 
2.7.3

--
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