Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
---
Notes:
Version 2:
- no change
src/qemu/qemu_monitor_json.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index d3447dd2f3..418bdcec92 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -5527,8 +5527,8 @@ qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon,
qemuMonitorCPUDefInfoPtr **cpus)
{
int ret = -1;
- virJSONValuePtr cmd;
- virJSONValuePtr reply = NULL;
+ VIR_AUTOPTR(virJSONValue) cmd = NULL;
+ VIR_AUTOPTR(virJSONValue) reply = NULL;
virJSONValuePtr data;
qemuMonitorCPUDefInfoPtr *cpulist = NULL;
size_t n = 0;
@@ -5630,8 +5630,6 @@ qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon,
qemuMonitorCPUDefInfoFree(cpulist[i]);
VIR_FREE(cpulist);
}
- virJSONValueFree(cmd);
- virJSONValueFree(reply);
return ret;
}
--
2.23.0