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.
This commit is contained in:
xinhua.Cao 2017-11-11 16:30:41 +08:00 committed by John Ferlan
parent ef5c8a91aa
commit b008797662

View File

@ -1686,6 +1686,7 @@ void remoteRelayConnectionClosedEvent(virConnectPtr conn ATTRIBUTE_UNUSED, int r
VIR_WARN("unexpected %s event deregister failure", name); \ VIR_WARN("unexpected %s event deregister failure", name); \
} \ } \
VIR_FREE(eventCallbacks); \ VIR_FREE(eventCallbacks); \
neventCallbacks = 0; \
} while (0); } while (0);
/* /*