From 1270c416e1ba726b4a1d15167babfe5f2c0b59e6 Mon Sep 17 00:00:00 2001 From: Eytan Lifshitz Date: Tue, 18 Feb 2014 15:02:29 +0200 Subject: [PATCH] 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 --- drivers/net/wireless/iwlwifi/iwl-nvm-parse.c | 1 + 1 file changed, 1 insertion(+) 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 */ -- 2.20.1