mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
qemu: Use virErrorPreserveLast in qemuDomainSnapshotCreateDiskActive
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
0f9a2a665b
commit
77f71c45ad
@ -15301,7 +15301,7 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
|
||||
|
||||
error:
|
||||
if (ret < 0) {
|
||||
orig_err = virSaveLastError();
|
||||
virErrorPreserveLast(&orig_err);
|
||||
for (i = 0; i < snapdef->ndisks; i++) {
|
||||
if (!diskdata[i].src)
|
||||
continue;
|
||||
@ -15341,11 +15341,7 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
|
||||
|
||||
cleanup:
|
||||
qemuDomainSnapshotDiskDataFree(diskdata, snapdef->ndisks, driver, vm);
|
||||
|
||||
if (orig_err) {
|
||||
virSetError(orig_err);
|
||||
virFreeError(orig_err);
|
||||
}
|
||||
virErrorRestore(&orig_err);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user