Re: [libvirt] [PATCH] Fix destroy command memory leaks

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

 



On Mon, May 19, 2008 at 05:30:33PM -0400, Cole Robinson wrote:
> Some pieces of libvirt currently assume that the vir*Destroy
> functions will free the passed object upon success. In
> practice none of the current drivers seem to do this,
> resulting in memory leaks.
> 
> The attached patch fixes the leaks I could find, as well as
> changes the comments for virDomainDestroy and virNetworkDestroy
> in libvirt.c to reflect reality. I also added a couple debug
> statements to hash.c where domain reference counts can be
> printed as they are changed.

For virDomainDestroy & virNetworkDestroy & virStoragePoolDestroy, I
have code which assumes that these calls also free the C structure.
AFAIK this has always been the supposedly correct behaviour of these
calls.

Maybe this was broken when Dan changed hash.c a while back?

Anyway the calls should be changed to do what they are supposed to do.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top

--
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]