]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuDomainHotplugAddIOThread: Automatically free virJSONValue
authorPeter Krempa <pkrempa@redhat.com>
Wed, 1 Dec 2021 08:05:35 +0000 (09:05 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 7 Dec 2021 08:00:39 +0000 (09:00 +0100)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_driver.c

index 6333d0af363796367f38f6a13ba723fd35b6c394..13e33a22892868b7feddfaba1f8243ae53a3368b 100644 (file)
@@ -5233,7 +5233,7 @@ qemuDomainHotplugAddIOThread(virQEMUDriver *driver,
     int new_niothreads = 0;
     qemuMonitorIOThreadInfo **new_iothreads = NULL;
     virDomainIOThreadIDDef *iothrid;
-    virJSONValue *props = NULL;
+    g_autoptr(virJSONValue) props = NULL;
     bool threadAdded = false;
     bool objectAdded = false;
 
@@ -5316,7 +5316,6 @@ qemuDomainHotplugAddIOThread(virQEMUDriver *driver,
     }
     virDomainAuditIOThread(vm, orig_niothreads, new_niothreads,
                            "update", ret == 0);
-    virJSONValueFree(props);
     return ret;
 
  exit_monitor: