From: ZhiPeng Lu Date: Wed, 27 Sep 2017 01:01:39 +0000 (+0800) Subject: nwfilter: Fix memory leak in learnIPAddressThread X-Git-Tag: v3.8.0-rc1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d957e2366334c467fa8adf2f11738a2032b2c06e;p=thirdparty%2Flibvirt.git nwfilter: Fix memory leak in learnIPAddressThread Don't leak @inetaddr within the done: processing when attempting to instantiate the filter. Signed-off-by: ZhiPeng Lu --- diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c index cfd92d9512..5b95f0e613 100644 --- a/src/nwfilter/nwfilter_learnipaddr.c +++ b/src/nwfilter/nwfilter_learnipaddr.c @@ -637,6 +637,7 @@ learnIPAddressThread(void *arg) req->filterparams); VIR_DEBUG("Result from applying firewall rules on " "%s with IP addr %s : %d", req->ifname, inetaddr, ret); + VIR_FREE(inetaddr); } } else { if (showError)