[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 for-2.0 18/24] block: Unlink temporary file
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL v2 for-2.0 18/24] block: Unlink temporary file |
Date: |
Thu, 13 Mar 2014 15:11:02 +0100 |
From: Max Reitz <address@hidden>
If the image file cannot be opened and was created as a temporary file,
it should be deleted; thus, in this case, we should jump to the
"unlink_and_fail" label and not just to "fail".
Reported-by: BenoƮt Canet <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
block.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block.c b/block.c
index cf5645a..fae50c9 100644
--- a/block.c
+++ b/block.c
@@ -1321,7 +1321,7 @@ int bdrv_open(BlockDriverState **pbs, const char
*filename,
bdrv_open_flags(bs, flags | BDRV_O_UNMAP) |
BDRV_O_PROTOCOL, true, &local_err);
if (ret < 0) {
- goto fail;
+ goto unlink_and_fail;
}
/* Find the right image format driver */
--
1.8.5.3
- [Qemu-devel] [PULL v2 for-2.0 21/24] block/raw-posix: bdrv_parse_filename() for floppy, (continued)
[Qemu-devel] [PULL v2 for-2.0 14/24] iothread: stash thread ID away, Stefan Hajnoczi, 2014/03/13
[Qemu-devel] [PULL v2 for-2.0 18/24] block: Unlink temporary file,
Stefan Hajnoczi <=
[Qemu-devel] [PULL v2 for-2.0 22/24] block/raw-posix: bdrv_parse_filename() for cdrom, Stefan Hajnoczi, 2014/03/13
[Qemu-devel] [PULL v2 for-2.0 23/24] block/raw-posix: Strip protocol prefix on creation, Stefan Hajnoczi, 2014/03/13
Re: [Qemu-devel] [PULL v2 for-2.0 00/24] Block patches, Peter Maydell, 2014/03/13
Re: [Qemu-devel] [PULL v2 for-2.0 00/24] Block patches, Hu Tao, 2014/03/13