qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] monitor: fix double-free of request error
@ 2018-07-05 16:42 Marc-André Lureau
  2018-07-06  4:06 ` Peter Xu
  2018-07-06  6:00 ` Markus Armbruster
  0 siblings, 2 replies; 5+ messages in thread
From: Marc-André Lureau @ 2018-07-05 16:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, eblake, Marc-André Lureau

qmp_error_response() will free the given error. Fix double-free in
later qmp_request_free().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 monitor.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/monitor.c b/monitor.c
index 3c9c97b73f..7af1f18d13 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4186,6 +4186,7 @@ static void monitor_qmp_bh_dispatcher(void *data)
     } else {
         assert(req_obj->err);
         rsp = qmp_error_response(req_obj->err);
+        req_obj->err = NULL;
         monitor_qmp_respond(req_obj->mon, rsp, NULL);
         qobject_unref(rsp);
     }
-- 
2.18.0.rc1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-07-06  7:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-05 16:42 [Qemu-devel] [PATCH] monitor: fix double-free of request error Marc-André Lureau
2018-07-06  4:06 ` Peter Xu
2018-07-06  6:25   ` Markus Armbruster
2018-07-06  7:33     ` Peter Xu
2018-07-06  6:00 ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).