On Thu, Nov 13, 2008 at 02:24:46PM +0100, Martin Zielinski wrote: > Hi Volker, all! > > Yesterday I reported a memleak in the smbd on the technical mailing list > with an attached pool-usage dump. > > I still do not fully understand the talloc system nor the memcache > functions, but as we currently have your attention on this topic :-) > > samba-3.2.4 - passdb/pdb_interface.c - pdb_getsampwnam() > > Quick shot from the hip: > > If the memcache_add_talloc () reuses the existing record - the previous > record (which is a pointer to talloced() data) is not being destroyed. > > Nonsense, or leak?
Looks like a leak. I have to revisit that code, in particular as it has changed significantly in master. > P.S. There are several situations in the code, where the allocated samu > structs are not destroyed in case of an error. But I'm still after it. If they are allocated from a temporary talloc context, the idea at least is that freeing that talloc context also frees the samu structure. If that is not the case, we have a bug in talloc. Volker
pgpA5PHlu04BX.pgp
Description: PGP signature
-- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba