From: Ján Tomko Date: Fri, 10 Dec 2021 17:33:06 +0000 (+0100) Subject: lxc: use g_auto in lxcContainerChild X-Git-Tag: v8.0.0-rc1~235 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe9d5d6d0024c3ff54b152ba817219526a66aba8;p=thirdparty%2Flibvirt.git lxc: use g_auto in lxcContainerChild Signed-off-by: Ján Tomko Reviewed-by: Michal Privoznik --- 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; }