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

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

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

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.


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.

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