linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Eduardo Abinader <eabinader@ocedo.com>, linux-wireless@vger.kernel.org
Cc: Eduardo Abinader <eduardo.abinader@riverbed.com>
Subject: Re: [PATCH] nl80211: avoid possible memleak on nl80211_set_reg
Date: Thu, 09 Jun 2016 09:58:00 +0200	[thread overview]
Message-ID: <1465459080.3442.2.camel@sipsolutions.net> (raw)
In-Reply-To: <1465224967-26892-1-git-send-email-eduardo.abinader@riverbed.com> (sfid-20160606_165618_946135_D46C5895)

On Mon, 2016-06-06 at 16:56 +0200, Eduardo Abinader wrote:
> Setting NULL just after freeing regdomain.
> 
> Signed-off-by: Eduardo Abinader <eduardo.abinader@riverbed.com>
> ---
>  net/wireless/nl80211.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index d120449..39d107d 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -5839,10 +5839,11 @@ static int nl80211_set_reg(struct sk_buff
> *skb, struct genl_info *info)
>  
>  	r = set_regdom(rd, REGD_SOURCE_CRDA);
>  	/* set_regdom took ownership */
> -	rd = NULL;
>  
>   bad_reg:
>  	kfree(rd);
> +	rd = NULL;

To this I can only say: what?

johannes

  reply	other threads:[~2016-06-09  7:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 14:56 [PATCH] nl80211: avoid possible memleak on nl80211_set_reg Eduardo Abinader
2016-06-09  7:58 ` Johannes Berg [this message]
2016-06-09  8:36   ` Arend Van Spriel
2016-06-09  8:39     ` Johannes Berg
  -- strict thread matches above, loose matches on Subject: below --
2016-06-06 14:46 Eduardo Abinader

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=1465459080.3442.2.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=eabinader@ocedo.com \
    --cc=eduardo.abinader@riverbed.com \
    --cc=linux-wireless@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).