diff mbox series

[PULL,06/29] replay: fix event queue flush for qemu shutdown

Message ID 20220606143644.1151112-7-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,01/29] target/i386/tcg: Fix masking of real-mode addresses with A20 bit | expand

Commit Message

Paolo Bonzini June 6, 2022, 2:36 p.m. UTC
From: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>

This patch fixes event queue flush in the case of emulator
shutdown. replay_finish_events should be called when replay_mode
is not cleared.

Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <165364836758.688121.7959245442743676491.stgit@pasha-ThinkPad-X280>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 replay/replay.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/replay/replay.c b/replay/replay.c
index 6df2abc18c..2d3607998a 100644
--- a/replay/replay.c
+++ b/replay/replay.c
@@ -387,9 +387,8 @@  void replay_finish(void)
     g_free(replay_snapshot);
     replay_snapshot = NULL;
 
-    replay_mode = REPLAY_MODE_NONE;
-
     replay_finish_events();
+    replay_mode = REPLAY_MODE_NONE;
 }
 
 void replay_add_blocker(Error *reason)