From: Kaifeng Zhu Date: Fri, 7 Mar 2014 15:03:40 +0000 (+0000) Subject: block-cow: don't close cow_fd twice on error X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=04ffc2f665cc0dd85f24274c696708dc3bc93156;p=qemu-xen-4.6-testing.git block-cow: don't close cow_fd twice on error Signed-off-by: Kaifeng Zhu Coverity-ID: 1056200 Reviewed-by: Andrew Cooper --- diff --git a/block-cow.c b/block-cow.c index 777d8a581..9ad0a32fd 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) {