[B.A.T.M.A.N.] [PATCHv2] batman-adv: remove obsolete deleted attribute for gateway node

Marek Lindner mareklindner at neomailbox.ch
Mon Jul 13 18:50:27 CEST 2015


On Tuesday, July 14, 2015 00:05:22 Marek Lindner wrote:
> >               curr_gw = batadv_gw_get_selected_gw_node(bat_priv);
> >               if (gw_node == curr_gw)
> >                       batadv_gw_reselect(bat_priv);
> >
> > +
> > +             if (curr_gw)
> > +                     batadv_gw_node_free_ref(curr_gw);
> >
> >       }
> > 
> >
> >  out:
> > -     if (curr_gw)
> > -             batadv_gw_node_free_ref(curr_gw);
> >
> >       if (gw_node)
> >               batadv_gw_node_free_ref(gw_node);
> >  }
> 
> After the batadv_gw_node_free_ref() 'bat_priv->gw.curr_gw' points to random 
> memory ...

I stand corrected. bat_priv->gw.curr_gw has its own refcounter to protect it 
from accidental deletion.

Cheers,
Marek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.open-mesh.org/pipermail/b.a.t.m.a.n/attachments/20150714/f871cd17/attachment.sig>


More information about the B.A.T.M.A.N mailing list