Skip to content

Commit 3ed8982

Browse files
Zhang Qilonggregkh
authored andcommitted
iwlwifi: mvm: fix a memory leak in iwl_mvm_mac_ctxt_beacon_changed
[ Upstream commit 0f5d44a ] If beacon_inject_active is true, we will return without freeing beacon. Fid that by freeing it before returning. Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> [reworded the commit message] Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802172232.d16206ca60fc.I9984a9b442c84814c307cee3213044e24d26f38a@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 608c835 commit 3ed8982

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,8 +1044,10 @@ int iwl_mvm_mac_ctxt_beacon_changed(struct iwl_mvm *mvm,
10441044
return -ENOMEM;
10451045

10461046
#ifdef CONFIG_IWLWIFI_DEBUGFS
1047-
if (mvm->beacon_inject_active)
1047+
if (mvm->beacon_inject_active) {
1048+
dev_kfree_skb(beacon);
10481049
return -EBUSY;
1050+
}
10491051
#endif
10501052

10511053
ret = iwl_mvm_mac_ctxt_send_beacon(mvm, vif, beacon);

0 commit comments

Comments
 (0)