diff --git a/src/domain_conf.c b/src/domain_conf.c index bad53f73fd..1d2cc7c6f5 100644 --- a/src/domain_conf.c +++ b/src/domain_conf.c @@ -532,6 +532,9 @@ void virDomainObjListFree(virDomainObjListPtr vms) { unsigned int i; + if (!vms) + return; + for (i = 0 ; i < vms->count ; i++) virDomainObjFree(vms->objs[i]); diff --git a/src/domain_event.c b/src/domain_event.c index daa6fd5f8e..0fa2822d16 100644 --- a/src/domain_event.c +++ b/src/domain_event.c @@ -38,6 +38,9 @@ void virDomainEventCallbackListFree(virDomainEventCallbackListPtr list) { int i; + if (!list) + return; + for (i=0; icount; i++) { virFreeCallback freecb = list->callbacks[i]->freecb; if (freecb) diff --git a/src/lxc_driver.c b/src/lxc_driver.c index a9c4f79ca8..bd0cf0ee1c 100644 --- a/src/lxc_driver.c +++ b/src/lxc_driver.c @@ -1439,10 +1439,12 @@ static int lxcStartup(int privileged) lxcDriverLock(lxc_driver); /* Check that this is a container enabled kernel */ - if(lxcContainerAvailable(0) < 0) + if (lxcContainerAvailable(0) < 0) { + VIR_INFO0("LXC support not available in this kernel, disabling driver"); goto cleanup; + } - if(VIR_ALLOC(lxc_driver->domainEventCallbacks) < 0) + if (VIR_ALLOC(lxc_driver->domainEventCallbacks) < 0) goto cleanup; if (!(lxc_driver->domainEventQueue = virDomainEventQueueNew())) goto cleanup;