if VDSP is set to null during the method delete(), Object snapshot can't be freed in
method free() in the same class.
Showing 1 changed file with 1 addition and 7 deletions.
View file
8 src/main/java/org/libvirt/DomainSnapshot.java
| | @@ -35,13 +35,7 @@ public DomainSnapshot(Connect virConnect, DomainSnapshotPointer
VDSP) { |
| | | | * @throws LibvirtException |
| | | | */ |
| | | | publicintdelete(intflags) throwsLibvirtException { |
| | | | int success =0; |
| | | | if (VDSP!=null) { |
| | | | success = processError(libvirt.virDomainSnapshotDelete(VDSP, flags)); |
| | | | VDSP=null; |
| | | | } |
| | | |
|
| | | | return success; |
| | | | return processError(libvirt.virDomainSnapshotDelete(VDSP, flags)); |
| | | | } |
| | | |
|
| | | | @Override |