The @oldDef variable in libxlAddDom0() is not used really. Drop it. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/libxl/libxl_driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 7c236383e4..731700ded6 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -606,7 +606,6 @@ libxlAddDom0(libxlDriverPrivatePtr driver) libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver); virDomainDefPtr def = NULL; virDomainObjPtr vm = NULL; - virDomainDefPtr oldDef = NULL; libxl_dominfo d_info; unsigned long long maxmem; int ret = -1; @@ -636,7 +635,7 @@ libxlAddDom0(libxlDriverPrivatePtr driver) if (!(vm = virDomainObjListAdd(driver->domains, def, driver->xmlopt, 0, - &oldDef))) + NULL))) goto cleanup; def = NULL; @@ -657,7 +656,6 @@ libxlAddDom0(libxlDriverPrivatePtr driver) cleanup: libxl_dominfo_dispose(&d_info); virDomainDefFree(def); - virDomainDefFree(oldDef); virDomainObjEndAPI(&vm); virObjectUnref(cfg); return ret; -- 2.21.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list