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-11 16:56:58 -04:00
parent b71d10cc8e
commit 0c691e9806

View File

@ -606,6 +606,7 @@ virExec(virCommandPtr cmd)
cmd->pid = pid;
VIR_FREE(groups);
VIR_FREE(binarystr);
return 0;