[prev in list] [next in list] [prev in thread] [next in thread] 

List:       samba-technical
Subject:    Re: [Samba] Possible memory leaks on lookup_sids()?
From:       Jeremy Allison <jra () samba ! org>
Date:       2007-10-27 1:05:15
Message-ID: 20071027010515.GE1376 () samba1
[Download RAW message or body]

On Fri, Oct 26, 2007 at 06:01:53PM -0700, Jeremy Allison wrote:
> On Fri, Oct 26, 2007 at 09:40:18AM +0200, Volker Lendecke wrote:
> > On Mon, Oct 22, 2007 at 06:28:57PM -0400, simo wrote:
> > > Li, it seem indeed that we are not freeing the tmp_ctx at the end of the
> > > function, but I need some time to read that code in detail to make sure
> > > we are not returning some of that memory to the caller.
> > 
> > I think it is true. We need to free tmp_ctx before
> > returning. At least this is what it was designed for.
> 
> Yes - all memory returned is talloced off the dom_infos
> and name_infos variables as talloc contexts, which belong
> to the incoming mem_ctx ctx. All memory on the
> tmp_ctx can be thrown away at this point (although
> it will still be freed when mem_ctx is freed).

Pushed with git rev 25bbc9a6613bef0f3f73ecf634a38a9d56020f40
Jeremy.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic