Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
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