[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20201030101213.39165-1-zhangqilong3@huawei.com>
Date: Fri, 30 Oct 2020 18:12:13 +0800
From: Zhang Qilong <zhangqilong3@...wei.com>
To: <kvalo@...eaurora.org>, <davem@...emloft.net>, <kuba@...nel.org>
CC: <johannes.berg@...el.com>, <emmanuel.grumbach@...el.com>,
<luciano.coelho@...el.com>, <linuxwifi@...el.com>,
<linux-wireless@...r.kernel.org>, <netdev@...r.kernel.org>
Subject: [PATCH] iwlwifi: mvm: fix a memory leak in iwl_mvm_mac_ctxt_beacon_changed
In the error path of iwl_mvm_mac_ctxt_beacon_changed,
the beacon it not be freed, and use dev_kfree_skb to
free it.
Signed-off-by: Zhang Qilong <zhangqilong3@...wei.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
index cbdebefb854a..6f5951aed8a7 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
@@ -1044,8 +1044,10 @@ int iwl_mvm_mac_ctxt_beacon_changed(struct iwl_mvm *mvm,
return -ENOMEM;
#ifdef CONFIG_IWLWIFI_DEBUGFS
- if (mvm->beacon_inject_active)
+ if (mvm->beacon_inject_active) {
+ dev_kfree_skb(beacon);
return -EBUSY;
+ }
#endif
ret = iwl_mvm_mac_ctxt_send_beacon(mvm, vif, beacon);
--
2.17.1
Powered by blists - more mailing lists