The function comment states that @props is always consumed, even on failure. This was not true with the failure if the monitor is not using QMP. --- This patch is new in the series. src/qemu/qemu_monitor.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 18f866f..9b86695 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -3245,11 +3245,13 @@ qemuMonitorAddObject(qemuMonitorPtr mon, mon, type, objalias, props); int ret = -1; - if (mon->json) + if (mon->json) { ret = qemuMonitorJSONAddObject(mon, type, objalias, props); - else + } else { + virJSONValueFree(props); virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", _("object adding requires JSON monitor")); + } return ret; } -- 2.2.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list