Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/vz/vz_utils.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c
index 8fed875281..90e26091bb 100644
--- a/src/vz/vz_utils.c
+++ b/src/vz/vz_utils.c
@@ -92,7 +92,7 @@ vzDomObjFromDomain(virDomainPtr domain)
static int
vzDoCmdRun(char **outbuf, const char *binary, va_list list)
{
- virCommand *cmd = virCommandNewVAList(binary, list);
+ g_autoptr(virCommand) cmd = virCommandNewVAList(binary, list);
int ret = -1;
if (outbuf)
@@ -104,7 +104,6 @@ vzDoCmdRun(char **outbuf, const char *binary, va_list list)
ret = 0;
cleanup:
- virCommandFree(cmd);
if (ret && outbuf)
VIR_FREE(*outbuf);
return ret;
--
2.31.1