aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2009-11-12 14:13:33 +0000
committerDaniel P. Berrange <berrange@redhat.com>2009-11-13 11:50:14 +0000
commit007f016b2df8f5df8fffd66a35656cdfae784bb1 (patch)
tree6d09d11afcb60b8029606313737b0c3b795f992a
parentFix check for existance of cgroups at creation (diff)
downloadlibvirt-007f016b2df8f5df8fffd66a35656cdfae784bb1.tar.gz
libvirt-007f016b2df8f5df8fffd66a35656cdfae784bb1.tar.bz2
libvirt-007f016b2df8f5df8fffd66a35656cdfae784bb1.zip
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
-rw-r--r--src/lxc/lxc_driver.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index d0fc01a31..138c6fc04 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -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;
}