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 committed 2009-11-13 11:50:14 +00:00
1 parent d11d93f406
commit 007f016b2d
1 file changed
+3 -2
+3 -2
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;
}