提交 007f016b 编写于 作者: D Daniel P. Berrange

Fix incorrect variable passed to LXC event callback

The wrong variable was being passed in with the LXC event callback
resulting in a later deadlock or crash

* src/lxc/lxc_driver.c: Pass 'vm' instead of 'driver' to event
  callback
上级 d11d93f4
......@@ -942,7 +942,8 @@ static void lxcMonitorEvent(int watch,
}
cleanup:
virDomainObjUnlock(vm);
if (vm)
virDomainObjUnlock(vm);
if (event) {
lxcDriverLock(driver);
lxcDomainEventQueue(driver, event);
......@@ -1226,7 +1227,7 @@ static int lxcVmStart(virConnectPtr conn,
vm->monitor,
VIR_EVENT_HANDLE_ERROR | VIR_EVENT_HANDLE_HANGUP,
lxcMonitorEvent,
driver, NULL)) < 0) {
vm, NULL)) < 0) {
lxcVmTerminate(conn, driver, vm, 0);
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册