[PATCH] Simplify ctdbd_conn.c a bit

Jeremy Allison jra at samba.org
Mon Jul 13 19:38:51 UTC 2015


On Mon, Jul 13, 2015 at 09:33:38PM +0200, Volker Lendecke wrote:
> On Mon, Jul 13, 2015 at 11:33:28AM -0700, Jeremy Allison wrote:
> > On Sat, Jul 11, 2015 at 03:55:47PM +0200, Volker Lendecke wrote:
> > > Hi!
> > > 
> > > Review&push appreciated!
> > 
> > LGTM except for one comment. In :
> > 
> > commit e168e5799e91b24cd60470221c4f4f5f5b7410d2
> > Author: Volker Lendecke <vl at samba.org>
> > Date:   Tue Jun 23 17:04:59 2015 +0200
> > 
> >     ctdbd_conn: Do an early return from ctdb_read_req
> >     
> >     Signed-off-by: Volker Lendecke <vl at samba.org>
> >     Reviewed-by: Jeremy Allison <jra at samba.org>
> > 
> > diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
> > index e2b564e..77e4e0e 100644
> > --- a/source3/lib/ctdbd_conn.c
> > +++ b/source3/lib/ctdbd_conn.c
> > @@ -423,7 +423,11 @@ static int ctdb_read_req(struct ctdbd_connection *conn, uint32_t reqid,
> >                         goto next_pkt;
> >                 }
> >  
> > -               ctdbd_msg_call_back(conn, msg);
> > +               ret = ctdbd_msg_call_back(conn, msg);
> > +               if (ret != 0) {
> > +                       return ret;
> > +               }
> > +
> >                 TALLOC_FREE(hdr);
> >                 goto next_pkt;
> > 
> > Shouldn't you also call:
> > 
> > TALLOC_FREE(hdr);
> > 
> > before return ret ?
> > 
> > I know it'll get cleaned up when mem_ctx gets
> > free'd, so I'm OK pushing it without, but as
> > you explicitly added a TALLOC_FREE(hdr) earlier
> > in the patchset in:
> 
> ARGS... Of course!
>  
> > I thought you might want it here also.
> 
> I see you don't have the autobuild with it started yet. I'll
> push the patchset with that change and your R-B. 

Yep - thanks for taking care of it.

> Thanks :-)

You're welcome !



More information about the samba-technical mailing list