diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2010-01-02 12:31:42 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-05 00:09:48 +0300 |
commit | 90852f7aed0f90d443efd7e0f9b82d8ac8186848 (patch) | |
tree | 07c7daa265dd6c2cfed47dceb912f8c6aae50c0b /drivers/net/wireless | |
parent | 13bda1225072f26603d3aeefc1f14c18b2ab29cd (diff) | |
download | linux-90852f7aed0f90d443efd7e0f9b82d8ac8186848.tar.xz |
mwl8k: fix configure_filter() memory leak on error
If there was an error acquiring the firmware lock in
mwl8k_configure_filter(), we would end up leaking the multicast
command packet prepared by mwl8k_prepare_multicast().
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 59d49159cf2a..59f92105b0c2 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c @@ -3157,8 +3157,10 @@ static void mwl8k_configure_filter(struct ieee80211_hw *hw, /* Clear unsupported feature flags */ *total_flags &= FIF_ALLMULTI | FIF_BCN_PRBRESP_PROMISC; - if (mwl8k_fw_lock(hw)) + if (mwl8k_fw_lock(hw)) { + kfree(cmd); return; + } if (priv->sniffer_enabled) { mwl8k_enable_sniffer(hw, 0); |