diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 7ec4fcc3d1..980984b199 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -702,14 +702,14 @@ libxlStateInitialize(bool privileged, if (!(cfg = libxlDriverConfigNew())) goto error; + if (libxlDriverConfigInit(cfg) < 0) + goto error; + driverConf = g_strdup_printf("%s/libxl.conf", cfg->configBaseDir); if (libxlDriverConfigLoadFile(cfg, driverConf) < 0) goto error; - if (libxlDriverConfigInit(cfg) < 0) - goto error; - /* Register the callbacks providing access to libvirt's event loop */ libxl_osevent_register_hooks(cfg->ctx, &libxl_osevent_callbacks, cfg->ctx);