From: Emmanuel Grumbach Date: Wed, 3 Dec 2014 06:25:44 +0000 (+0200) Subject: iwlwifi: don't double free a pointer if no FW was found X-Git-Tag: firefly_0821_release~176^2~2456^2~25^2~2^2~12 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=31a5a09c1c5c888181e86a951a9a6c3ec27f7642;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Emmanuel Grumbach --- 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: