From: Wang King Date: Thu, 18 May 2017 04:06:42 +0000 (+0800) Subject: util: Do not leak @handles in stop netlink event service X-Git-Tag: v3.4.0-rc1~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=506acac87f0621762281b509071e7472c49a692b;p=thirdparty%2Flibvirt.git util: Do not leak @handles in stop netlink event service Commit e3ba4025 introduced srv->handles and VIR_RESIZE_N to allocate @handles as necessary, but did not free the handles during when calling virNetlinkEventServiceStop. --- diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index 32fe135259..d732fe8cf3 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -758,6 +758,7 @@ virNetlinkEventServiceStop(unsigned int protocol) } server[protocol] = NULL; + VIR_FREE(srv->handles); virNetlinkEventServerUnlock(srv); virMutexDestroy(&srv->lock);