From b1675bac67c590ffd68b38a6fdacc66442ca7b8c Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Fri, 29 Jun 2012 14:36:15 -0400 Subject: [PATCH] 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(+) diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index 8729f9c164..57e5593d6f 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -379,6 +379,7 @@ virNWFilterRuleDefAddVar(virNWFilterRuleDefPtr nwf, if (VIR_EXPAND_N(nwf->varAccess, nwf->nVarAccess, 1) < 0) { virReportOOMError(); + virNWFilterVarAccessFree(varAccess); return -1; }