[prev in list] [next in list] [prev in thread] [next in thread]
List: samba-technical
Subject: Re: [PATCH] fix smbclient segfault
From: Jeremy Allison <jra () samba ! org>
Date: 2014-09-22 19:57:43
Message-ID: 20140922195743.GB15230 () samba2
[Download RAW message or body]
On Mon, Sep 22, 2014 at 09:24:30PM +0200, Michael Adam wrote:
> On 2014-09-22 at 12:20 -0700, Jeremy Allison wrote:
> > On Mon, Sep 22, 2014 at 10:15:10AM +0200, Andreas Schneider wrote:
> > > On Monday 22 September 2014 09:59:34 Michael Adam wrote:
> > > > Hi,
> > >
> > > Hey,
> > >
> > > > shouldn't subreq be freed before leaving the function,
> > > > i.e. further down?
> > >
> > > to be honest, I'm not sure. A bit further down smbXcli_req_set_pending(subreq)
> > > is called and I guess it needs to live longer cause of that call.
> >
> > Yep, looks correct to me. smbXcli_req_set_pending(subreq) ensures
> > the subreq must live longer than this function.
>
> But should be freed in all failure cases, I think.
Not needed IMHO. subreq is hung off state,
which (as is req) is hung off the calling mem_ctx,
which in both cases is a talloc_stackfram().
But we can add that in if you really want to :-).
Jeremy.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic