util: Resolve resource leak

Need to free @groups in the parent on success similar to other
APIs (virFile*) which use virGetGroupList and virFork.

Reported by Coverity.
This commit is contained in:
John Ferlan
2017-10-12 18:27:00 -04:00
parent b71d10cc8e
commit 0c691e9806
+1
View File
@@ -606,6 +606,7 @@ virExec(virCommandPtr cmd)
cmd->pid = pid;
VIR_FREE(groups);
VIR_FREE(binarystr);
return 0;