mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-14 08:35:15 +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,
|
virReportSystemError(errno,
|
||||||
_("cannot remove corrupt file: %s"),
|
_("cannot remove corrupt file: %s"),
|
||||||
path);
|
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;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6255,9 +6256,10 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
|
|||||||
virReportSystemError(errno,
|
virReportSystemError(errno,
|
||||||
_("cannot remove corrupt file: %s"),
|
_("cannot remove corrupt file: %s"),
|
||||||
path);
|
path);
|
||||||
goto error;
|
} else {
|
||||||
|
fd = -3;
|
||||||
}
|
}
|
||||||
return -3;
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virReportError(VIR_ERR_OPERATION_FAILED, "%s", msg);
|
virReportError(VIR_ERR_OPERATION_FAILED, "%s", msg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user