提交 d4cea8df 编写于 作者: D Dunrong Huang 提交者: Stefan Hajnoczi

block: use correct filename

The content filename point to may be erased by qemu_opts_absorb_qdict()
in raw_open_common() in drv->bdrv_file_open()

So it's better to use bs->filename.
Signed-off-by: NDunrong Huang <riegamaths@gmail.com>
Reviewed-by: NMax Reitz <mreitz@redhat.com>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 5c1fa877
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册