[libvirt PATCH 08/14] lxc: use g_auto in lxcContainerChild

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

 



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

diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 1d5b9bf429..3f38c55fc6 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -1927,7 +1927,7 @@ static int lxcContainerChild(void *data)
     int ret = -1;
     g_autofree char *ttyPath = NULL;
     virDomainFSDef *root;
-    virCommand *cmd = NULL;
+    g_autoptr(virCommand) cmd = NULL;
     int hasReboot;
     g_autofree gid_t *groups = NULL;
     int ngroups;
@@ -2075,7 +2075,6 @@ static int lxcContainerChild(void *data)
                 virGetLastErrorMessage());
     }
 
-    virCommandFree(cmd);
     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