]> www.infradead.org Git - users/dwmw2/qemu.git/commit
qga: process_event() simplification and leak fix
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 19 Jul 2018 18:40:59 +0000 (20:40 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 24 Jul 2018 22:47:40 +0000 (17:47 -0500)
commitbf1cb819e983494f2606f9d7ff0726c210a6c757
tree07fcbacbd1abb403064e6e848ac275f2e2afc79a
parent08c4a51c65fcde99255d8ab9eabbaefeca5f9250
qga: process_event() simplification and leak fix

json_parser_parse_err() may return something else than a QDict, in
which case we loose the object. Let's keep track of the original
object to avoid leaks.

When an error occurs, "qdict" contains the response, but we still
check the "execute" key there. Untangle a bit this code, by having a
clear error path.

CC: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
(cherry picked from commit ae7da1e5f658ea21d96e565514de20ff2cf24fa1)
* drop context dep on d43b16945a
* drop functional dep on cb3e7f08ae
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qga/main.c