* src/domain_conf.c: Make virDomainObjListFree a no-op if list
is NULL
* src/domain_event.c: make virDomainEventCallbackListFree a no-op
if event list is NULL
* src/lxc_driver.c: Log a message if LXC driver does not startup
due to lacking kernel support
{
unsigned int i;
+ if (!vms)
+ return;
+
for (i = 0 ; i < vms->count ; i++)
virDomainObjFree(vms->objs[i]);
virDomainEventCallbackListFree(virDomainEventCallbackListPtr list)
{
int i;
+ if (!list)
+ return;
+
for (i=0; i<list->count; i++) {
virFreeCallback freecb = list->callbacks[i]->freecb;
if (freecb)
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;