summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-12-03 08:25:44 +0200
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-12-14 10:20:30 +0200
commit31a5a09c1c5c888181e86a951a9a6c3ec27f7642 (patch)
treeca3ce5674536203da2dc9da0069d22642263a101 /drivers/net
parent03d6c3b0fa4f5f0379cede079ec828a6c999fe43 (diff)
iwlwifi: don't double free a pointer if no FW was found
In the very unlikely case in which no firmware could be, found. the same pointer was freed twice. Fix that. Fixes: 490fefebb6db ("iwlwifi: define the .ucode file format for debug") Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c
index 38de1513e4de..850b85a47806 100644
--- a/drivers/net/wireless/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/iwlwifi/iwl-drv.c
@@ -1323,10 +1323,10 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
try_again:
/* try next, if any */
- kfree(pieces);
release_firmware(ucode_raw);
if (iwl_request_firmware(drv, false))
goto out_unbind;
+ kfree(pieces);
return;
out_free_fw: