From: Stefan Berger Date: Fri, 29 Jun 2012 18:36:15 +0000 (-0400) Subject: nwfilter: Fix memory leak X-Git-Tag: v0.9.11.5~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6fba8c1f37f9b05949b6e04a32c5cc313a0c9cc7;p=thirdparty%2Flibvirt.git 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. (cherry picked from commit b1675bac67c590ffd68b38a6fdacc66442ca7b8c) --- diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index 07edf19fd3..724d33e230 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -375,6 +375,7 @@ virNWFilterRuleDefAddVar(virNWFilterRuleDefPtr nwf, if (VIR_EXPAND_N(nwf->varAccess, nwf->nVarAccess, 1) < 0) { virReportOOMError(); + virNWFilterVarAccessFree(varAccess); return -1; }