This is an alternative to https://www.redhat.com/archives/libvir-list/2020-April/msg01081.html which actually fixes qemuDomainSaveImageOpen in a way that would make it more obvious which value needs to be returned and also cleans up the code some more. Peter Krempa (6): qemu: fix domain start with corrupted save file virQEMUSaveData: Register autoclear function and use it in qemuDomainSaveImageOpen qemuDomainSaveImageOpen: Use g_autoptr for 'dom' qemuDomainSaveImageOpen: Automatically close 'fd' if unneeded qemuDomainSaveImageOpen: Use 'g_new0' instead of VIR_ALLOC(_N) qemuDomainSaveImageOpen: Refactor handling of errors src/qemu/qemu_driver.c | 82 +++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 41 deletions(-) -- 2.26.0