[libvirt] [PATCH] Fix a virsh edit memory leak

Eric Blake eblake at redhat.com
Wed Apr 28 21:09:41 UTC 2010

On 04/28/2010 02:27 PM, Chris Lalancette wrote:
> When running virsh edit, we are unlinking and setting
> the tmp variable to NULL before going to the end of the
> function, meaning that we never free tmp.  Since the
> exit to the function will always unlink and free tmp,
> just remove this bit of code and let it get done at the
> end.

ACK.  By the way, should we add another patch to warn if unlink() fails
for any reason?

Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100428/d51d0852/attachment-0001.sig>

More information about the libvir-list mailing list