1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-25 01:34:11 +03:00

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
This commit is contained in:
Daniel P. Berrange 2009-11-12 14:13:33 +00:00
parent d11d93f406
commit 007f016b2d

View File

@ -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;
}