mwifiex: remove redundant TDLS setup action frame check and avoid leaks
authorBing Zhao <bzhao@marvell.com>
Tue, 15 Jul 2014 03:53:34 +0000 (20:53 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 16 Jul 2014 13:57:58 +0000 (09:57 -0400)
commitf95f59fe5d2b05a0333214eeba78690081ee5f70
tree5463614b71ab393a3988a559f00b112923050dd0
parent6daf43216fd5171f0f44504226efeb5563538f66
mwifiex: remove redundant TDLS setup action frame check and avoid leaks

The unwanted frame types are already handled in 'default' case
of the switch/case below.
The str_ptr is allocated but it can be leaked if the length check
fails in the REQUEST/RESP cases. Fix it by allocating sta_ptr
after the length checks.

Reported-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/tdls.c