* [PATCH] mac80211: fix bug in ieee80211_build_probe_req
@ 2011-11-08 12:04 Johannes Berg
0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2011-11-08 12:04 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
From: Johannes Berg <johannes.berg@intel.com>
ieee80211_probereq_get() can return NULL in
which case we should clean up & return NULL
in ieee80211_build_probe_req() as well.
Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/util.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/net/mac80211/util.c 2011-11-08 09:24:02.000000000 +0100
+++ b/net/mac80211/util.c 2011-11-08 12:50:12.000000000 +0100
@@ -880,6 +880,8 @@ struct sk_buff *ieee80211_build_probe_re
skb = ieee80211_probereq_get(&local->hw, &sdata->vif,
ssid, ssid_len,
buf, buf_len);
+ if (!skb)
+ goto out;
if (dst) {
mgmt = (struct ieee80211_mgmt *) skb->data;
@@ -888,6 +890,8 @@ struct sk_buff *ieee80211_build_probe_re
}
IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
+
+ out:
kfree(buf);
return skb;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-11-08 12:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-08 12:04 [PATCH] mac80211: fix bug in ieee80211_build_probe_req Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox