mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
qemu: Fix starting a domain with corrupted managed save file
Commit v3.4.0-44-gac793bd71 fixed a memory leak, but failed to return the special -3 value. Thus an attempt to start a domain with corrupted managed save file would removed the corrupted file and report "An error occurred, but the cause is unknown" instead of starting the domain from scratch. https://bugzilla.redhat.com/show_bug.cgi?id=1460962
This commit is contained in:
parent
2502a0fade
commit
16e31fb38d
@ -6450,17 +6450,15 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
|
||||
*ret_def = def;
|
||||
*ret_data = data;
|
||||
|
||||
cleanup:
|
||||
virObjectUnref(caps);
|
||||
|
||||
return fd;
|
||||
|
||||
error:
|
||||
virDomainDefFree(def);
|
||||
virQEMUSaveDataFree(data);
|
||||
VIR_FORCE_CLOSE(fd);
|
||||
virObjectUnref(caps);
|
||||
|
||||
return -1;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
static int ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5) ATTRIBUTE_NONNULL(6)
|
||||
|
Loading…
Reference in New Issue
Block a user