[libvirt] fix method delete() in src/main/java/org/libvirt/DomainSnapshot.java

傅姜晨 jcf1e10 at 163.com
Wed Mar 13 07:13:42 UTC 2019


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 |
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190313/568023bb/attachment-0001.htm>


More information about the libvir-list mailing list