diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 9fb4fa513e..0a67ad24f5 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -4682,6 +4682,8 @@ libxlDomainGetNumaParameters(virDomainPtr dom, * the filtering on behalf of older clients that can't parse it. */ flags &= ~VIR_TYPED_PARAM_STRING_OKAY; + libxl_bitmap_init(&nodemap); + libxlDriverLock(driver); vm = virDomainObjListFindByUUID(driver->domains, dom->uuid); libxlDriverUnlock(driver); @@ -4703,8 +4705,6 @@ libxlDomainGetNumaParameters(virDomainPtr dom, priv = vm->privateData; - libxl_bitmap_init(&nodemap); - if ((*nparams) == 0) { *nparams = LIBXL_NUMA_NPARAM; ret = 0;