[libvirt] [PATCH] daemon: Plug memory leak on remoteDispatchAuthList

Eric Blake eblake at redhat.com
Mon Feb 20 18:08:41 UTC 2012

[side note - top-posting on technical lists makes it a bit harder to
follow the conversation - I've reformatted my reply]

On 02/20/2012 09:06 AM, Alex Jia wrote:
> Hello Eric,

>> I wouldn't be surprised if there is still a lurking bug here; after all,
>> my commit 15a280bb was an attempt to solve a valgrind memory leak, which
>> was then in turn reworked by Jim in commits c05ec920 and fcdfa31f.  But
>> we need to diagnose and patch the real problem, if this is the case.

> As you said, it's impossible to fix this leak by my change, 
> and from codes point of view, the failure path hasn't any
> memory leak. I suspect valgrind gave a incorrect report, 
> and I will check it later.

At this point, I've re-read fcdfa31f, and don't see any leak of ident.
I suspect that what really happened is that you ran valgrind on 0.9.10,
prior to my commit 15a280b, where there really was a memleak on ident;
but then wrote your patch after upgrading to latest rather than
re-checking valgrind to see if libvirt.git had fixed the bug in the
meantime.  Since my commit 15a280b didn't mention plugging a memory
leak, nor that I had found the regression in question by using valgrind,
I can see why I might have confused you.  So not only did I cause
problems by introducing the leak prior to 0.9.10, I compounded it in my
patch to fix the leak.  Sorry for the mess I caused :)

Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

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

More information about the libvir-list mailing list