mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
b71d10cc8e
commit
0c691e9806
|
@ -606,6 +606,7 @@ virExec(virCommandPtr cmd)
|
|||
|
||||
cmd->pid = pid;
|
||||
|
||||
VIR_FREE(groups);
|
||||
VIR_FREE(binarystr);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue