Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx> --- src/vz/vz_driver.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 0350b7d..01dd204 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -1519,6 +1519,8 @@ vzConnectRegisterCloseCallback(virConnectPtr conn, vzConnPtr privconn = conn->privateData; int ret = -1; + virObjectLock(privconn->driver); + if (virConnectCloseCallbackDataGetCallback(privconn->closeCallback) != NULL) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("A close callback is already registered")); @@ -1530,6 +1532,7 @@ vzConnectRegisterCloseCallback(virConnectPtr conn, ret = 0; cleanup: + virObjectUnlock(privconn->driver); return ret; } @@ -1540,6 +1543,7 @@ vzConnectUnregisterCloseCallback(virConnectPtr conn, virConnectCloseFunc cb) vzConnPtr privconn = conn->privateData; int ret = -1; + virObjectLock(privconn->driver); if (virConnectCloseCallbackDataGetCallback(privconn->closeCallback) != cb) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", @@ -1551,6 +1555,7 @@ vzConnectUnregisterCloseCallback(virConnectPtr conn, virConnectCloseFunc cb) ret = 0; cleanup: + virObjectUnlock(privconn->driver); return ret; } -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list