Skip to content

Commit

Permalink
mwl8k: fix configure_filter() memory leak on error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lennert Buytenhek authored and John W. Linville committed Jan 4, 2010
1 parent 13bda12 commit 90852f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/wireless/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 90852f7

Please sign in to comment.