summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorMoshe Harel <moshe.harel@intel.com>2015-09-10 15:29:09 +0300
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-10-25 13:45:09 +0200
commit2edb7a3372c76c9379d0fc00e4274ea8f018248a (patch)
tree0f818d3d820118048bbae803e9e980326a28f55a /drivers/net/wireless/iwlwifi
parent06ecdba319e2b389c94c7b6a9c936d09ec188359 (diff)
iwlwifi: nvm: free old section data when reading nvm file
When reading external NVM file, if a section exists both in OTP and in the external file, the memory that was allocated at OTP reading is not freed. This is possible only on systems that have an external NVM file which is typically the case on embedded systems. Signed-off-by: Moshe Harel <moshe.harel@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/nvm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/nvm.c b/drivers/net/wireless/iwlwifi/mvm/nvm.c
index 4e4a680f274a..2ee0f6fe56a1 100644
--- a/drivers/net/wireless/iwlwifi/mvm/nvm.c
+++ b/drivers/net/wireless/iwlwifi/mvm/nvm.c
@@ -483,6 +483,7 @@ static int iwl_mvm_read_external_nvm(struct iwl_mvm *mvm)
ret = -ENOMEM;
break;
}
+ kfree(mvm->nvm_sections[section_id].data);
mvm->nvm_sections[section_id].data = temp;
mvm->nvm_sections[section_id].length = section_size;