From: Dan Carpenter <dan.carpenter@oracle.com>
To: Johannes Berg <johannes@sipsolutions.net>, Arnd Bergmann <arnd@arndb.de>
Cc: linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] mac80211: free sinfo on error path
Date: Sat, 30 Jan 2016 14:39:06 +0000 [thread overview]
Message-ID: <20160130143906.GD3462@mwanda> (raw)
There is a missing kfree(sinfo) on error in sta_info_insert_finish().
Fixes: 5fe74014172d ('mac80211: avoid excessive stack usage in sta_info')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 6c198e6..1502efb 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -562,6 +562,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
out_err:
mutex_unlock(&local->sta_mtx);
rcu_read_lock();
+ kfree(sinfo);
return err;
}
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Johannes Berg <johannes@sipsolutions.net>, Arnd Bergmann <arnd@arndb.de>
Cc: linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] mac80211: free sinfo on error path
Date: Sat, 30 Jan 2016 17:39:06 +0300 [thread overview]
Message-ID: <20160130143906.GD3462@mwanda> (raw)
There is a missing kfree(sinfo) on error in sta_info_insert_finish().
Fixes: 5fe74014172d ('mac80211: avoid excessive stack usage in sta_info')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 6c198e6..1502efb 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -562,6 +562,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
out_err:
mutex_unlock(&local->sta_mtx);
rcu_read_lock();
+ kfree(sinfo);
return err;
}
next reply other threads:[~2016-01-30 14:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-30 14:39 Dan Carpenter [this message]
2016-01-30 14:39 ` [patch] mac80211: free sinfo on error path Dan Carpenter
2016-01-30 19:58 ` Arend van Spriel
2016-01-30 19:58 ` Arend van Spriel
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=20160130143906.GD3462@mwanda \
--to=dan.carpenter@oracle.com \
--cc=arnd@arndb.de \
--cc=johannes@sipsolutions.net \
--cc=kernel-janitors@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.