]> git.proxmox.com Git - mirror_qemu.git/blobdiff - block.c
block: use correct filename
[mirror_qemu.git] / block.c
diff --git a/block.c b/block.c
index e2d9936227d57186068c75f79d48d7e1b7c86a0c..d7ca37e6adb33cbb32141e7e838fb25979ef82bf 100644 (file)
--- a/block.c
+++ b/block.c
@@ -824,8 +824,8 @@ static int bdrv_open_common(BlockDriverState *bs, BlockDriverState *file,
 
 #ifndef _WIN32
     if (bs->is_temporary) {
-        assert(filename != NULL);
-        unlink(filename);
+        assert(bs->filename[0] != '\0');
+        unlink(bs->filename);
     }
 #endif
     return 0;