mac80211: fix memory leaks with element parsing
authorJohannes Berg <johannes.berg@intel.com>
Fri, 1 Oct 2021 19:11:08 +0000 (21:11 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 21 Oct 2021 14:54:04 +0000 (16:54 +0200)
commit8223ac199a3849257e86ec27865dc63f034b1cf1
treee7e391484c4dbe8592e4c8da300442f4a8ec5be1
parent10de5a599f92ef776886073a33ca7bbbe6b14d37
mac80211: fix memory leaks with element parsing

My previous commit 5d24828d05f3 ("mac80211: always allocate
struct ieee802_11_elems") had a few bugs and leaked the new
allocated struct in a few error cases, fix that.

Fixes: 5d24828d05f3 ("mac80211: always allocate struct ieee802_11_elems")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20211001211108.9839928e42e0.Ib81ca187d3d3af7ed1bfeac2e00d08a4637c8025@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/agg-rx.c
net/mac80211/ibss.c
net/mac80211/mlme.c