]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuSnapshotDiskContextNew: Don't set 'ndd'
authorPeter Krempa <pkrempa@redhat.com>
Thu, 24 Sep 2020 10:50:41 +0000 (12:50 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 24 Sep 2020 11:20:45 +0000 (13:20 +0200)
'ndd' tracks the actual number of snapshot disks filled into the
structure and is incremented by the functions filling the context, thus
it must not be set when initializing the context.

Fixes: 8c2ecdf131c
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_snapshot.c

index 63401db2a9c95974aea9f6513a854918476c2375..ca051071aac603750dfe4f1eed3b504ede0be908 100644 (file)
@@ -865,7 +865,6 @@ qemuSnapshotDiskContextNew(size_t ndisks,
     qemuSnapshotDiskContextPtr ret = g_new0(qemuSnapshotDiskContext, 1);
 
     ret->dd = g_new0(qemuSnapshotDiskData, ndisks);
-    ret->ndd = ndisks;
     ret->actions = virJSONValueNewArray();
     ret->vm = vm;
     ret->asyncJob = asyncJob;