diff options
author | Orit Wasserman <owasserm@redhat.com> | 2012-09-24 13:11:10 +0200 |
---|---|---|
committer | Doug Goldstein <cardoe@cardoe.com> | 2012-11-13 22:50:04 -0600 |
commit | 421053ee0181f74bc4b63475fcbbac5b8b1818f4 (patch) | |
tree | 98faaebe49fe11e1cb6b9b3843f222d07e3da478 | |
parent | Fix address handling in inet_nonblocking_connect (diff) | |
download | qemu-kvm-421053ee0181f74bc4b63475fcbbac5b8b1818f4.tar.gz qemu-kvm-421053ee0181f74bc4b63475fcbbac5b8b1818f4.tar.bz2 qemu-kvm-421053ee0181f74bc4b63475fcbbac5b8b1818f4.zip |
Clear handler only for valid fd
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 3202becaa2b805497ce9e6faa6edfb83665f91b1)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
(cherry picked from commit d893e56f7249708080e2d363ce19d30a6de30733)
-rw-r--r-- | migration.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/migration.c b/migration.c index 1edeec5dd..22a05c437 100644 --- a/migration.c +++ b/migration.c @@ -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"); |