public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Marek Lindner <mareklindner@neomailbox.ch>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Simon Wunderlich <simon@open-mesh.com>
Subject: Re: [B.A.T.M.A.N.] [PATCHv2] batman-adv: remove obsolete deleted attribute for gateway node
Date: Tue, 14 Jul 2015 00:50:27 +0800	[thread overview]
Message-ID: <4189875.r5OON8DARS@voltaire> (raw)
In-Reply-To: <3846505.HTcyTpK9ms@voltaire>

[-- Attachment #1: Type: text/plain, Size: 764 bytes --]

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

      reply	other threads:[~2015-07-13 16:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-26 11:11 [B.A.T.M.A.N.] [PATCHv2] batman-adv: remove obsolete deleted attribute for gateway node Simon Wunderlich
2015-07-13 16:05 ` Marek Lindner
2015-07-13 16:50   ` Marek Lindner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4189875.r5OON8DARS@voltaire \
    --to=mareklindner@neomailbox.ch \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=simon@open-mesh.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox