mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
virsh: Fix segfault of snapshot-list
'snaps' is used after free()'ed.
This commit is contained in:
parent
b6ab7a067f
commit
e0ad466983
@ -866,7 +866,7 @@ vshSnapshotListCollect(vshControl *ctl, virDomainPtr dom,
|
||||
goto cleanup;
|
||||
}
|
||||
if (from) {
|
||||
snaps[snaplist->nsnaps++] = from;
|
||||
snaplist->snaps[snaplist->nsnaps++].snap = from;
|
||||
virDomainSnapshotRef(from);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user