lxc: use g_auto in lxcContainerChild

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko 2021-12-10 18:33:06 +01:00
parent ee6b552aab
commit fe9d5d6d00

View File

@ -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;
}