aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-07-05 18:42:01 +0200
committerMarkus Armbruster <armbru@redhat.com>2018-07-11 21:11:15 +0200
commit42eab8dbec2f3fd4a14bd63ab01aa155ce5724a3 (patch)
treeccb23cf9b12a64dba913e9a15a97b7ccff039169 /monitor.c
parentc447afd5783b9237fa51b7a85777007d8d568bfc (diff)
monitor: fix double-free of request error
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> Message-Id: <20180705164201.9853-1-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Fixes: 1cc37471525d03f963bc71d724f0dc9eab888fc1 Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c1
1 files changed, 1 insertions, 0 deletions
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);
}