diff options
author | Haim Dreyfuss <haim.dreyfuss@intel.com> | 2015-05-20 01:10:43 -0400 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-05-21 15:26:59 -0400 |
commit | 2fc863a5143d64b8f06576cc3d7fd5622c5cf3b5 (patch) | |
tree | a34709c3bb501890073d9ea0f1e51470bdf8575f /drivers/net/wireless/iwlwifi/mvm | |
parent | ba830b3d093580f424fd31b7cd693046a86cf030 (diff) |
iwlwifi: mvm: Free fw_status after use to avoid memory leak
fw_status is the only pointer pointing to a block of memory
allocated above and should be freed after use.
Note: this come from Klockwork static analyzer.
Cc: stable@vger.kernel.org [3.19+]
Fixes: 2021a89d7b8a ("iwlwifi: mvm: treat netdetect wake up separately")
Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/d3.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c index 1b1b2bf26819..42dadaf5e24d 100644 --- a/drivers/net/wireless/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/iwlwifi/mvm/d3.c | |||
@@ -1750,8 +1750,10 @@ static void iwl_mvm_query_netdetect_reasons(struct iwl_mvm *mvm, | |||
1750 | int i, j, n_matches, ret; | 1750 | int i, j, n_matches, ret; |
1751 | 1751 | ||
1752 | fw_status = iwl_mvm_get_wakeup_status(mvm, vif); | 1752 | fw_status = iwl_mvm_get_wakeup_status(mvm, vif); |
1753 | if (!IS_ERR_OR_NULL(fw_status)) | 1753 | if (!IS_ERR_OR_NULL(fw_status)) { |
1754 | reasons = le32_to_cpu(fw_status->wakeup_reasons); | 1754 | reasons = le32_to_cpu(fw_status->wakeup_reasons); |
1755 | kfree(fw_status); | ||
1756 | } | ||
1755 | 1757 | ||
1756 | if (reasons & IWL_WOWLAN_WAKEUP_BY_RFKILL_DEASSERTED) | 1758 | if (reasons & IWL_WOWLAN_WAKEUP_BY_RFKILL_DEASSERTED) |
1757 | wakeup.rfkill_release = true; | 1759 | wakeup.rfkill_release = true; |