qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] dump: fix use-after-free for s->fd


From: arei.gonglei
Subject: [Qemu-devel] [PATCH] dump: fix use-after-free for s->fd
Date: Wed, 29 Oct 2014 18:28:20 +0800

From: Gonglei <address@hidden>

After commit 4c7e251a (), when dump memory completed,
the s->fd will be closed twice. We should return
directly when dump completed.

Signed-off-by: Gonglei <address@hidden>
---
 dump.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dump.c b/dump.c
index 06a4915..9d9a409 100644
--- a/dump.c
+++ b/dump.c
@@ -626,6 +626,7 @@ static void dump_iterate(DumpState *s, Error **errp)
         ret = get_next_block(s, block);
         if (ret == 1) {
             dump_completed(s);
+            return;
         }
     }
 }
-- 
1.7.12.4





reply via email to

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