From 04ffc2f665cc0dd85f24274c696708dc3bc93156 Mon Sep 17 00:00:00 2001 From: Kaifeng Zhu Date: Fri, 7 Mar 2014 15:03:40 +0000 Subject: [PATCH] block-cow: don't close cow_fd twice on error Signed-off-by: Kaifeng Zhu Coverity-ID: 1056200 Reviewed-by: Andrew Cooper --- block-cow.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block-cow.c b/block-cow.c index 777d8a5817..9ad0a32fd8 100644 --- a/block-cow.c +++ b/block-cow.c @@ -224,7 +224,6 @@ static int cow_create(const char *filename, int64_t image_sectors, fd = open(image_filename, O_RDONLY | O_BINARY); if (fd < 0) { - close(cow_fd); goto mtime_fail; } if (fstat(fd, &st) != 0) { -- 2.39.5