mac80211: fix possible NULL pointer dereference
authorMariusz Kozlowski <mk@lab.zgora.pl>
Sat, 26 Mar 2011 17:58:51 +0000 (18:58 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 28 Mar 2011 19:42:02 +0000 (15:42 -0400)
commit67aa030c0dff6095128bcb4e8043b48360f32331
tree91f839fbe604cf1f96a12b2ca09bb65a317fe284
parent1f951a7f8ba05192291f781ef99a892697e47d62
mac80211: fix possible NULL pointer dereference

This patch moves 'key' dereference after BUG_ON(!key) so that when key is NULL
we will see proper trace instead of oops.

Signed-off-by: Mariusz Kozlowski <mk@lab.zgora.pl>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/key.c