From: xinhua.Cao Date: Sat, 11 Nov 2017 08:30:41 +0000 (+0800) Subject: remote: Set *neventCallbacks to zero at DEREG_CB X-Git-Tag: v3.10.0-rc1~156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0087976624638940a0293357013b6f24ccf015d;p=thirdparty%2Flibvirt.git remote: Set *neventCallbacks to zero at DEREG_CB To avoid the chance that the loop is run twice, set the neventCallbacks to zero after VIR_FREE(eventCallbacks) was called. --- diff --git a/daemon/remote.c b/daemon/remote.c index 07557e9c35..cbcb6e8419 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -1686,6 +1686,7 @@ void remoteRelayConnectionClosedEvent(virConnectPtr conn ATTRIBUTE_UNUSED, int r VIR_WARN("unexpected %s event deregister failure", name); \ } \ VIR_FREE(eventCallbacks); \ + neventCallbacks = 0; \ } while (0); /*