• B
    mwifiex: don't leak 'chan_stats' on reset · fb9e67be
    Brian Norris 提交于
    'chan_stats' is (re)allocated in _mwifiex_fw_dpc() ->
    mwifiex_init_channel_scan_gap(), which is called whenever the device is
    initialized -- at probe or at reset.
    
    But we only free it in we completely unregister the adapter, meaning we
    leak a copy of it during every reset.
    
    Let's free it in the shutdown / removal paths instead (and in the
    error-handling path), to avoid the leak.
    
    Ideally, we can eventually unify much of mwifiex_shutdown_sw() and
    mwifiex_remove_card() (way too much copy-and-paste) to reduce the burden
    on bugfixes like this. But that's work for tomorrow.
    Signed-off-by: NBrian Norris <briannorris@chromium.org>
    Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
    fb9e67be
main.c 48.9 KB