[libvirt PATCH 10/14] lxc: use g_auto for virCommand in virLXCProcessEnsureRootFS

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

 



Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/lxc/lxc_process.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 118d9cbdcc..db023630bd 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -1187,7 +1187,7 @@ int virLXCProcessStart(virConnectPtr conn,
     char ebuf[1024];
     g_autofree char *timestamp = NULL;
     int nsInheritFDs[VIR_LXC_DOMAIN_NAMESPACE_LAST];
-    virCommand *cmd = NULL;
+    g_autoptr(virCommand) cmd = NULL;
     virLXCDomainObjPrivate *priv = vm->privateData;
     g_autoptr(virCaps) caps = NULL;
     virErrorPtr err = NULL;
@@ -1555,7 +1555,6 @@ int virLXCProcessStart(virConnectPtr conn,
             virLXCProcessCleanup(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED, stopFlags);
         }
     }
-    virCommandFree(cmd);
     for (i = 0; i < nttyFDs; i++)
         VIR_FORCE_CLOSE(ttyFDs[i]);
     for (i = 0; i < G_N_ELEMENTS(handshakefds); i++)
-- 
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