As requested in: https://www.redhat.com/archives/libvir-list/2020-March/msg00377.html this is an incremental refactor of qemuDomainSecretAESSetup. Posted only as an individual refactor to omit re-sending the 26 other patches from the original series. Peter Krempa (5): qemuDomainSecretInfo: Register autoptr cleanup function qemuDomainSecretAESSetup: Automatically free non-secret locals qemuDomainSecretAESSetup: Allocate and return 'secinfo' here qemuDomainSecretAESSetup: Split out lookup of secret data Remove qemuDomainSecretInfoNew src/qemu/qemu_domain.c | 178 ++++++++++++++++++----------------------- src/qemu/qemu_domain.h | 2 + 2 files changed, 82 insertions(+), 98 deletions(-) -- 2.24.1