mwifiex: fix null derefs, mem leaks and trivia
authorChristoph Fritz <chf.fritz@googlemail.com>
Sun, 8 May 2011 20:50:09 +0000 (22:50 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 10 May 2011 19:54:50 +0000 (15:54 -0400)
commitb53575ecf939a4f752de87eabf1adbcfa4478a6c
tree0e98918a3602d0abd1ff6bcc5dea9cef0763c99d
parent3ed3f49473985718ce51f84d990ed5b8b6472598
mwifiex: fix null derefs, mem leaks and trivia

This patch:
 - adds kfree() where necessary
 - prevents potential null dereferences
 - makes use of kfree_skb()
 - replaces -1 for failed kzallocs with -ENOMEM

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Reviewed-by: Kiran Divekar <dkiran@marvell.com>
Tested-by: Amitkumar Karwar <akarwar@marvell.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/11n_aggr.c
drivers/net/wireless/mwifiex/cfg80211.c
drivers/net/wireless/mwifiex/cmdevt.c
drivers/net/wireless/mwifiex/init.c
drivers/net/wireless/mwifiex/main.c
drivers/net/wireless/mwifiex/scan.c
drivers/net/wireless/mwifiex/sdio.c
drivers/net/wireless/mwifiex/sta_ioctl.c