Skip to content
Commit 45010c08 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Kalle Valo
Browse files

iwlwifi: pnvm: Fix a memory leak in 'iwl_pnvm_get_from_fs()'

A firmware is requested but never released in this function. This leads to
a memory leak in the normal execution path.

Add the missing 'release_firmware()' call.
Also introduce a temp variable (new_len) in order to keep the value of
'pnvm->size' after the firmware has been released.

Fixes: cdda18fb

 ("iwlwifi: pnvm: move file loading code to a separate function")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarLuca Coelho <luca@coelho.fi>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1b5d80f54c1dbf85710fd285243932943b498fe7.1630614969.git.christophe.jaillet@wanadoo.fr
parent 851c8e76
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment