Winbindd Memory Leak

Tim Potter tpot at samba.org
Wed Oct 3 16:06:03 GMT 2001


Esh, Andrew writes:

> I reported a bad memory leak in winbindd some time in the recent past. I've
> made some progress finding it, so I thought I'd report. To catch up: I took
> a snapshot of SAMBA_2_2 from your CVS at date "2001-10-01 1600GMT", compiled
> it for winbindd, and found that it leaks memory when processing user lists.

[...]

> The size of the leak varies from 8 to 12 bytes, but the stack is always
> identical. The call to talloc implies that all of this leaked memory could
> be freed at one point by calling talloc_destroy. My problem is, I don't know
> (yet) where to do that. The obvious place is somewhere in the stack listed
> above, but I don't quite see where yet.

There is a call to lp_talloc_free() in the winbindd main loop
which should free memory as it is going along.  This only frees
memory from the global tdb used for parameter strings.  I suspect
there is another TALLOC_CTX that is being used, probably in the
rpc code, that is not being freed.  I'm taking a look at it now.


Tim.




More information about the samba-technical mailing list