Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_snapshot.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index 29e86342d6..67180a2b10 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -541,9 +541,6 @@ qemuSnapshotPrepareDiskExternal(virDomainObj *vm,
bool reuse,
bool blockdev)
{
- struct stat st;
- int err;
- int rc;
if (disk->src->readonly && !(reuse || blockdev)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
@@ -567,6 +564,10 @@ qemuSnapshotPrepareDiskExternal(virDomainObj *vm,
}
if (virStorageSourceIsLocalStorage(snapdisk->src)) {
+ struct stat st;
+ int err;
+ int rc;
+
if (virStorageSourceInit(snapdisk->src) < 0)
return -1;
--
2.31.1