mac80211: destroy assoc_data correctly if assoc fails
authorEliad Peller <eliad@wizery.com>
Mon, 2 Jul 2012 11:42:03 +0000 (14:42 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jul 2012 15:58:57 +0000 (08:58 -0700)
commit3cf16f7e388934d4458d0d6cebdf752e4424f226
tree39ab80a575f7ad735c01cc6806fe9ead84034d34
parentc8ed7cf355f41b649524029c49f101d878499482
mac80211: destroy assoc_data correctly if assoc fails

commit 10a9109f2705fdc3caa94d768b2559587a9a050c upstream.

If association failed due to internal error (e.g. no
supported rates IE), we call ieee80211_destroy_assoc_data()
with assoc=true, while we actually reject the association.

This results in the BSSID not being zeroed out.

After passing assoc=false, we no longer have to call
sta_info_destroy_addr() explicitly. While on it, move
the "associated" message after the assoc_success check.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/mlme.c