diff options
author | Eytan Lifshitz <eytan.lifshitz@intel.com> | 2014-02-18 15:02:29 +0200 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-02-20 19:18:04 +0200 |
commit | 1270c416e1ba726b4a1d15167babfe5f2c0b59e6 (patch) | |
tree | 42b51ddf5b33beb48856e1a2c7cee12a9d61ab91 /drivers/net/wireless/iwlwifi/iwl-nvm-parse.c | |
parent | ffa702647c0ed534be042542d492f4ed94d178f8 (diff) | |
download | linux-stable-1270c416e1ba726b4a1d15167babfe5f2c0b59e6.tar.gz linux-stable-1270c416e1ba726b4a1d15167babfe5f2c0b59e6.tar.bz2 linux-stable-1270c416e1ba726b4a1d15167babfe5f2c0b59e6.zip |
iwlwifi: mvm: fix possible memory leak
iwl_parse_nvm_data() doesn't free allocated memory if it is
fed with invalid parameter. Fix this.
Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-nvm-parse.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-nvm-parse.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c index df3ea60c87d9..80c40967cd35 100644 --- a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c @@ -516,6 +516,7 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg, if (!nvm_calib) { IWL_ERR_DEV(dev, "Can't parse empty Calib NVM sections\n"); + kfree(data); return NULL; } /* in family 8000 Xtal calibration values moved to OTP */ |