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: cdda18fbbefa ("iwlwifi: pnvm: move file loading code to a separate function")
Signed-off-by: Christophe JAILLET <email@example.com>
Reviewed-by: Dan Carpenter <firstname.lastname@example.org>
Acked-by: Luca Coelho <email@example.com>
Signed-off-by: Kalle Valo <firstname.lastname@example.org>
1 file changed