Re: [libvirt] [PATCH] Free object after *Destroy in python bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cole Robinson wrote:
> The patch below fixes an issue in the python bindings with the
> vir*Destroy methods. After the object is successfully destroyed,
> the payload is cleared, using 'self._o = None'. This unfortunately
> screws up virt object reference counts, as the payload should be 
> free'd using the appropriate vir*Free function.
> 

Hmm, I might be wrong about this. Reading the virDomainDestroy
description in libvirt.c, destroy is supposed to free the
domain object if the operation is successful. The qemu driver
currently does not do this. In fact, from what I gather, none
of the drivers do this.

If the virDomainDestroy comment is correct, then the original
python statement is sufficient, but the drivers need to have
a few virDomainFree's added.

Anybody have more info on this?

Thanks,
Cole

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]