提交 3202beca 编写于 作者: O Orit Wasserman 提交者: Anthony Liguori

Clear handler only for valid fd

Signed-off-by: NOrit Wasserman <owasserm@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 233aa5c2
......@@ -240,7 +240,9 @@ static int migrate_fd_cleanup(MigrationState *s)
{
int ret = 0;
qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
if (s->fd != -1) {
qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
}
if (s->file) {
DPRINTF("closing file\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册