mwifiex: move del_timer_sync(scan_delay_timer) call to fix memleak
Currently it is in mwifiex_adapter_cleanup() which doesn't get called if driver initialization is failed causing memory leak. scan_delay_timer is initialized in mwifiex_register(), so it should be deleted in mwifiex_unregister(). Hence it has been moved to appropriate place. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Esse commit está contido em:

commit de
John W. Linville

pai
43ba6b9f2f
commit
003d87cbec
@@ -197,6 +197,7 @@ static int mwifiex_unregister(struct mwifiex_adapter *adapter)
|
||||
for (i = 0; i < adapter->priv_num; i++) {
|
||||
if (adapter->priv[i]) {
|
||||
mwifiex_free_curr_bcn(adapter->priv[i]);
|
||||
del_timer_sync(&adapter->priv[i]->scan_delay_timer);
|
||||
kfree(adapter->priv[i]);
|
||||
}
|
||||
}
|
||||
|
Referência em uma nova issue
Block a user