From: Eytan Lifshitz Date: Tue, 18 Feb 2014 13:02:29 +0000 (+0200) Subject: iwlwifi: mvm: fix possible memory leak X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1270c416e1ba726b4a1d15167babfe5f2c0b59e6;p=linux-beck.git 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 Signed-off-by: Emmanuel Grumbach --- 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 */