qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 1/3] migration: Allow ram_save_cleanup to be called


From: Fam Zheng
Subject: [Qemu-devel] [PATCH 1/3] migration: Allow ram_save_cleanup to be called with empty state
Date: Fri, 15 Sep 2017 13:44:02 +0800

So that we can do cleanup unconditionally at the end of main().

Signed-off-by: Fam Zheng <address@hidden>
---
 migration/ram.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/migration/ram.c b/migration/ram.c
index e18b3e2d4f..37e6a71241 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1365,6 +1365,9 @@ static void ram_save_cleanup(void *opaque)
     RAMState **rsp = opaque;
     RAMBlock *block;
 
+    if (!rsp || !*rsp) {
+        return;
+    }
     /* caller have hold iothread lock or is in a bh, so there is
      * no writing race against this migration_bitmap
      */
-- 
2.13.5




reply via email to

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