diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2021-09-02 22:38:11 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2021-09-05 09:11:10 +0300 |
commit | 45010c080e6e7434fcae73212b0087a03590049f (patch) | |
tree | 2382fc8f622f1ec8690f1d8e4ca55669c737f437 /drivers/net/wwan/iosm/iosm_ipc_flash.c | |
parent | 851c8e761c393a63d6346b472ae40b4ef74eba1f (diff) |
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 <christophe.jaillet@wanadoo.fr>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Luca Coelho <luca@coelho.fi>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1b5d80f54c1dbf85710fd285243932943b498fe7.1630614969.git.christophe.jaillet@wanadoo.fr
Diffstat (limited to 'drivers/net/wwan/iosm/iosm_ipc_flash.c')
0 files changed, 0 insertions, 0 deletions