qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v5 4/4] Clear handler only for valid fd


From: Orit Wasserman
Subject: [Qemu-devel] [PATCH v5 4/4] Clear handler only for valid fd
Date: Mon, 24 Sep 2012 13:11:10 +0200

Signed-off-by: Orit Wasserman <address@hidden>
---
 migration.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/migration.c b/migration.c
index 1edeec5..22a05c4 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");
-- 
1.7.7.6




reply via email to

[Prev in Thread] Current Thread [Next in Thread]