render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
a41c76
From 09776b6ac6421a03fe2ff72eb6146a9ca0119259 Mon Sep 17 00:00:00 2001
a41c76
Message-Id: <09776b6ac6421a03fe2ff72eb6146a9ca0119259@dist-git>
a41c76
From: Michal Privoznik <mprivozn@redhat.com>
a41c76
Date: Thu, 16 Jan 2020 10:03:52 +0100
a41c76
Subject: [PATCH] qemuDomainSaveImageStartVM: Use g_autoptr() for virCommand
a41c76
MIME-Version: 1.0
a41c76
Content-Type: text/plain; charset=UTF-8
a41c76
Content-Transfer-Encoding: 8bit
a41c76
a41c76
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
a41c76
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
a41c76
a41c76
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1718707
a41c76
a41c76
(cherry picked from commit 82e127e34350dc0ed908611a3b2a4fbd78ad9903)
a41c76
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
a41c76
Message-Id: <5d41d06ee27842659082e67dd6abf40c3c59ae5d.1579165329.git.mprivozn@redhat.com>
a41c76
Reviewed-by: Ján Tomko <jtomko@redhat.com>
a41c76
---
a41c76
 src/qemu/qemu_driver.c | 3 +--
a41c76
 1 file changed, 1 insertion(+), 2 deletions(-)
a41c76
a41c76
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
a41c76
index 9de5bc6a32..e1c0550b9a 100644
a41c76
--- a/src/qemu/qemu_driver.c
a41c76
+++ b/src/qemu/qemu_driver.c
a41c76
@@ -6804,7 +6804,7 @@ qemuDomainSaveImageStartVM(virConnectPtr conn,
a41c76
     bool restored = false;
a41c76
     virObjectEventPtr event;
a41c76
     VIR_AUTOCLOSE intermediatefd = -1;
a41c76
-    virCommandPtr cmd = NULL;
a41c76
+    g_autoptr(virCommand) cmd = NULL;
a41c76
     g_autofree char *errbuf = NULL;
a41c76
     g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
a41c76
     virQEMUSaveHeaderPtr header = &data->header;
a41c76
@@ -6920,7 +6920,6 @@ qemuDomainSaveImageStartVM(virConnectPtr conn,
a41c76
 
a41c76
  cleanup:
a41c76
     virObjectUnref(cookie);
a41c76
-    virCommandFree(cmd);
a41c76
     if (qemuSecurityRestoreSavedStateLabel(driver, vm, path) < 0)
a41c76
         VIR_WARN("failed to restore save state label on %s", path);
a41c76
     return ret;
a41c76
-- 
a41c76
2.25.0
a41c76