mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Fix virsh snapshot-list error reporting
Noticed that the expected "not supported" error is dropped when invoking 'virsh snapshot-list dom' on a Xen installation running the libxl driver virsh snapshot-list test error: Invalid snapshot: virDomainSnapshotFree The error is overwritten by a call to virDomainSnapshotFree in cleanup code within cmdSnapshotList. Prevent overwritting the real error by not calling virDomainSnapshotFree with a NULL virDomainSnapshotPtr.
This commit is contained in:
parent
56b54173ed
commit
e3b21cdc31
@ -1678,7 +1678,8 @@ cleanup:
|
|||||||
vshSnapshotListFree(snaplist);
|
vshSnapshotListFree(snaplist);
|
||||||
VIR_FREE(parent_snap);
|
VIR_FREE(parent_snap);
|
||||||
VIR_FREE(state);
|
VIR_FREE(state);
|
||||||
virDomainSnapshotFree(start);
|
if (start)
|
||||||
|
virDomainSnapshotFree(start);
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
xmlFreeDoc(xml);
|
xmlFreeDoc(xml);
|
||||||
VIR_FREE(doc);
|
VIR_FREE(doc);
|
||||||
|
Loading…
Reference in New Issue
Block a user