Clear handler only for valid fd
Signed-off-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
233aa5c2d1
commit
3202becaa2
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user