Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Felix Fietkau and committed by
Johannes Berg
2bf0ccc7 0241fa19

+1 -1
+1 -1
net/wireless/util.c
··· 676 676 u8 *payload; 677 677 int offset = 0, remaining, err; 678 678 struct ethhdr eth; 679 - bool reuse_skb = true; 679 + bool reuse_skb = false; 680 680 bool last = false; 681 681 682 682 if (has_80211_header) {