mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-14 00:25:17 +00:00
qemu: Fix memory leaks in qemuDomainSaveImageOpen
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
ec3e4bb75a
commit
ac793bd719
@ -6235,12 +6235,13 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
|
||||
virReportSystemError(errno,
|
||||
_("cannot remove corrupt file: %s"),
|
||||
path);
|
||||
goto error;
|
||||
} else {
|
||||
fd = -3;
|
||||
}
|
||||
return -3;
|
||||
} else {
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
"%s", _("failed to read qemu header"));
|
||||
}
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
"%s", _("failed to read qemu header"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -6255,9 +6256,10 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
|
||||
virReportSystemError(errno,
|
||||
_("cannot remove corrupt file: %s"),
|
||||
path);
|
||||
goto error;
|
||||
} else {
|
||||
fd = -3;
|
||||
}
|
||||
return -3;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
virReportError(VIR_ERR_OPERATION_FAILED, "%s", msg);
|
||||
|
Loading…
x
Reference in New Issue
Block a user