Skip to contentSkip to conversation

cfg80211: fix faulty variable initialization in ieee80211_amsdu_to_8023s

PATCH Applied Felix Fietkau 2 participants 2 messages Feb 8, 2016 – Feb 23, 2016 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cfg80211: fix faulty variable initialization in ieee80211_amsdu_to_8023s

reuse_skb is set to true if the code decides to use the last segment. Fixes a memory leak

---
 net/wireless/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/util.c +1 -1
index 6e4eb35..9880c89 100644
@@ -676,7 +676,7 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
 	u8 *payload;
 	int offset = 0, remaining, err;
 	struct ethhdr eth;
-	bool reuse_skb = true;
+	bool reuse_skb = false;
 	bool last = false;
 
 	if (has_80211_header) {
Signature · 1 line
2.2.2
maintainer Applied
#1 lore raw
Quoted 3 lines · Felix Fietkau

reuse_skb is set to true if the code decides to use the last segment. Fixes a memory leak

Applied.

johannes