[libvirt] nwfilter: Fix memory leak

Below patch fixes this coverity report: /libvirt/src/conf/nwfilter_conf.c:382: leaked_storage: Variable "varAccess" going out of scope leaks the storage it points to. --- src/conf/nwfilter_conf.c | 1 + 1 file changed, 1 insertion(+) Index: libvirt-acl/src/conf/nwfilter_conf.c =================================================================== --- libvirt-acl.orig/src/conf/nwfilter_conf.c +++ libvirt-acl/src/conf/nwfilter_conf.c @@ -379,6 +379,7 @@ virNWFilterRuleDefAddVar(virNWFilterRule if (VIR_EXPAND_N(nwf->varAccess, nwf->nVarAccess, 1) < 0) { virReportOOMError(); + virNWFilterVarAccessFree(varAccess); return -1; }

On 06/28/2012 06:38 PM, Stefan Berger wrote:
Below patch fixes this coverity report:
/libvirt/src/conf/nwfilter_conf.c:382: leaked_storage: Variable "varAccess" going out of scope leaks the storage it points to.
--- src/conf/nwfilter_conf.c | 1 + 1 file changed, 1 insertion(+)
ACK. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 06/28/2012 09:41 PM, Eric Blake wrote:
On 06/28/2012 06:38 PM, Stefan Berger wrote:
Below patch fixes this coverity report:
/libvirt/src/conf/nwfilter_conf.c:382: leaked_storage: Variable "varAccess" going out of scope leaks the storage it points to.
--- src/conf/nwfilter_conf.c | 1 + 1 file changed, 1 insertion(+) ACK.
pushed
participants (2)
-
Eric Blake
-
Stefan Berger