[PATCH] Allow talloc reparenting in a destructor.
ira at samba.org
Sat Mar 7 10:42:41 MST 2015
Reviewed-by: Ira Cooper <ira at samba.org>
(all 3 patches)
On Sat, Mar 7, 2015 at 11:17 AM, Jeremy Allison <jra at samba.org> wrote:
> On Thu, Mar 05, 2015 at 01:01:52PM -0800, Jeremy Allison wrote:
> > On Thu, Mar 05, 2015 at 05:41:06PM +0100, Volker Lendecke wrote:
> > > On Thu, Mar 05, 2015 at 08:38:08AM -0800, Jeremy Allison wrote:
> > > > Ah - picky compilers on our build machine :-).
> > > >
> > > > I need to explicitly ignore the return
> > > > from talloc_move() I think. Just added a (void).
> > >
> > > Re-pushed. Lets see how far we get this time.
> > New code exposed a bug inside smbd ! :-).
> > static int smbd_smb2_notify_smbreq_destructor(struct smb_request *smbreq)
> > was already trying to reparent a talloc'ed
> > object and return -1 to keep it around, and
> > we just got lucky that the thing it *actually*
> > got reparented to stayed around long enough.
> > In addition it found a bug calling talloc_set_destructor()
> > from inside an object destructor - any newly
> > set destructor was being overwritten by the old
> > one by talloc.
> > New fix for both issues, plus test modified
> > to test both problems attached.
> Ping ! Can I get a review on this one please ? It
> is fixing a genuine bug (memory leak in
> Once it's in master I'll log a bug and prepare back ports
> for 4.x.x.
More information about the samba-technical