[libvirt PATCH 03/14] qemu_snapshot: revert: use g_autoptr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/qemu/qemu_snapshot.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index 413b31bae5..5ac1c99a68 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -1940,8 +1940,8 @@ qemuSnapshotRevert(virDomainObj *vm,
     int detail;
     qemuDomainObjPrivate *priv = vm->privateData;
     int rc;
-    virDomainDef *config = NULL;
-    virDomainDef *inactiveConfig = NULL;
+    g_autoptr(virDomainDef) config = NULL;
+    g_autoptr(virDomainDef) inactiveConfig = NULL;
     g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
     qemuDomainSaveCookie *cookie;
     unsigned int start_flags = VIR_QEMU_PROCESS_START_GEN_VMID;
@@ -2233,8 +2233,6 @@ qemuSnapshotRevert(virDomainObj *vm,
     }
     virObjectEventStateQueue(driver->domainEventState, event);
     virObjectEventStateQueue(driver->domainEventState, event2);
-    virDomainDefFree(config);
-    virDomainDefFree(inactiveConfig);
 
     return ret;
 }
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux