From: John Ferlan Date: Wed, 11 Oct 2017 20:56:58 +0000 (-0400) Subject: util: Resolve resource leak X-Git-Tag: CVE-2017-1000256~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c691e9806128abfbf8cdebbb91dfcb332870367;p=thirdparty%2Flibvirt.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. --- diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 41a61da49f..6cd76a560e 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -606,6 +606,7 @@ virExec(virCommandPtr cmd) cmd->pid = pid; + VIR_FREE(groups); VIR_FREE(binarystr); return 0;