In learnIPAddressThread()the @inetaddr may be leaked. Signed-off-by: ZhiPeng Lu <lu.zhipeng@xxxxxxxxxx> --- src/nwfilter/nwfilter_learnipaddr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c index cfd92d9..018f20f 100644 --- a/src/nwfilter/nwfilter_learnipaddr.c +++ b/src/nwfilter/nwfilter_learnipaddr.c @@ -627,6 +627,7 @@ learnIPAddressThread(void *arg) "cache for interface %s"), inetaddr, req->ifname); } + inetaddr = NULL; ret = virNWFilterInstantiateFilterLate(req->driver, NULL, req->ifname, @@ -636,7 +637,8 @@ learnIPAddressThread(void *arg) req->filtername, req->filterparams); VIR_DEBUG("Result from applying firewall rules on " - "%s with IP addr %s : %d", req->ifname, inetaddr, ret); + "%s with IP addr %s : %d", req->ifname, NULLSTR(inetaddr), ret); + VIR_FREE(inetaddr); } } else { if (showError) -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list