Two functions called in sequence both initialized the virStorageSource
backing 'store' leading to a memleak.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_backup.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
index 531005425b..43fe8942ad 100644
--- a/src/qemu/qemu_backup.c
+++ b/src/qemu/qemu_backup.c
@@ -272,9 +272,6 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm,
dd->backingStore = dd->terminator = virStorageSourceNew();
}
- if (qemuDomainStorageFileInit(priv->driver, vm, dd->store,
dd->domdisk->src) < 0)
- return -1;
-
if (qemuDomainPrepareStorageSourceBlockdev(NULL, dd->store, priv, cfg) < 0)
return -1;
@@ -410,7 +407,7 @@ qemuBackupDiskPrepareOneStorage(virDomainObjPtr vm,
return -1;
}
- if (qemuDomainStorageFileInit(priv->driver, vm, dd->store, NULL) < 0)
+ if (qemuDomainStorageFileInit(priv->driver, vm, dd->store,
dd->domdisk->src) < 0)
return -1;
dd->initialized = true;
--
2.26.2