nl80211: fix memory leak if validate_pae_over_nl80211() fails
authorJohannes Berg <johannes.berg@intel.com>
Sat, 15 Dec 2018 09:03:22 +0000 (11:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Jan 2019 08:51:02 +0000 (09:51 +0100)
commit366fc5858720b749d52a32ec15c8420939092b2a
treeeb3d2807937485dc65ac0f54427fe6da0f814701
parent098143bfc29e1709fab54891176325a346d9e100
nl80211: fix memory leak if validate_pae_over_nl80211() fails

[ Upstream commit d350a0f431189517b1af0dbbb605c273231a8966 ]

If validate_pae_over_nl80211() were to fail in nl80211_crypto_settings(),
we might leak the 'connkeys' allocation. Fix this.

Fixes: 64bf3d4bc2b0 ("nl80211: Add CONTROL_PORT_OVER_NL80211 attribute")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/wireless/nl80211.c