mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-09 01:04:59 +00:00
libxl: Fix libvirtd crash on domain restore
Commit cc2a3c2a94
missed one case in the libxl driver where virDomainDef
is returned from libxlDomainSaveImageOpen and a g_steal_pointer is needed.
Without it, the virDomainDef object is freed and the driver crashes later
in the restore process when accessing the object.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
d2bc5a04c0
commit
454b927d1e
@ -811,7 +811,7 @@ libxlDomainSaveImageOpen(libxlDriverPrivate *driver,
|
|||||||
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
*ret_def = def;
|
*ret_def = g_steal_pointer(&def);
|
||||||
*ret_hdr = hdr;
|
*ret_hdr = hdr;
|
||||||
|
|
||||||
return fd;
|
return fd;
|
||||||
|
Loading…
Reference in New Issue
Block a user