mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
libxl: Don't free def member of virDomainObj
The refactoring in commit de49d5bad3 accidentally dropped the statement setting def to NULL after successfully adding it to the virDomainObjList, causing it to be freed while still in use. The resulting memory corruption caused unpredictable behavior, often resulting in a libvirtd crash. Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
88008f3b99
commit
709c0e7616
@ -627,6 +627,7 @@ libxlAddDom0(libxlDriverPrivatePtr driver)
|
||||
NULL)))
|
||||
goto cleanup;
|
||||
|
||||
def = NULL;
|
||||
vm->persistent = 1;
|
||||
virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, VIR_DOMAIN_RUNNING_BOOTED);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user