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

[Xen-devel] [PATCH 18/32] block-cow: don't close cow_fd twice on error



From: Kaifeng Zhu <kaifeng.zhu@xxxxxxxxxx>

Signed-off-by: Kaifeng Zhu <kaifeng.zhu@xxxxxxxxxx>
Coverity-ID: 1056200
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 block-cow.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/block-cow.c b/block-cow.c
index 777d8a5..9ad0a32 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) {
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.