mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Fix libxl vm def handling on domU cleanup
* src/libxl/libxl_driver.c: in libxlVmCleanup, free up the newDef definition if present overwise it would be leaked.
This commit is contained in:
parent
f59b71ac57
commit
685753a360
@ -276,6 +276,13 @@ libxlVmCleanup(libxlDriverPrivatePtr driver,
|
|||||||
VIR_DEBUG("Failed to remove domain XML for %s", vm->def->name);
|
VIR_DEBUG("Failed to remove domain XML for %s", vm->def->name);
|
||||||
VIR_FREE(file);
|
VIR_FREE(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vm->newDef) {
|
||||||
|
virDomainDefFree(vm->def);
|
||||||
|
vm->def = vm->newDef;
|
||||||
|
vm->def->id = -1;
|
||||||
|
vm->newDef = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user