When commit id 'da86c6c22' added support for diskPriv->encinfo in
qemuDomainSecretDiskPrepare a change to qemuDomainSecretDiskDestroy
to was missed. Although qemuDomainDiskPrivateDispose probably would
do the trick.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/qemu/qemu_domain.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 290f337d4..ee05966c3 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1399,10 +1399,11 @@ qemuDomainSecretDiskDestroy(virDomainDiskDefPtr disk)
{
qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
- if (!diskPriv || !diskPriv->secinfo)
- return;
+ if (diskPriv && diskPriv->secinfo)
+ qemuDomainSecretInfoFree(&diskPriv->secinfo);
- qemuDomainSecretInfoFree(&diskPriv->secinfo);
+ if (diskPriv && diskPriv->encinfo)
+ qemuDomainSecretInfoFree(&diskPriv->encinfo);
}
--
2.13.5