]> git.karo-electronics.de Git - linux-beck.git/commit
wil6210: fix memory leak in the AP flow
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Mon, 17 Mar 2014 13:34:17 +0000 (15:34 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 17 Mar 2014 17:44:18 +0000 (13:44 -0400)
commit8bf6adb988c6843f0e58d2b210526cf947a8a746
tree911326c6ad96a61015c909dc7063847e3def2f4a
parentfa4a18e73b21402ed00cfb852d94d169994c5aa3
wil6210: fix memory leak in the AP flow

When switching between STA and AP modes, memory allocated for Rx vring leaks
This is because start_ap() allocates Rx vring but stop_ap() do not free it.
Logically, Rx vring is not valid (HW can't use it anymore), so free it in reset()
Also, check double init for Rx vring and bail out with -EINVAL

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/wil6210/main.c
drivers/net/wireless/ath/wil6210/txrx.c