Commit 2edb7a33 authored by Moshe Harel's avatar Moshe Harel Committed by Emmanuel Grumbach

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: default avatarMoshe Harel <moshe.harel@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 06ecdba3
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment