[libvirt] [PATCH] Fix destroy command memory leaks

Cole Robinson crobinso at redhat.com
Mon May 19 21:30:33 UTC 2008


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.

Thanks,
Cole
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libvirt-more-ref-cleanup-patch
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080519/cda83ec5/attachment-0001.ksh>


More information about the libvir-list mailing list