Thread (4 messages) flat view 4 messages, 4 authors, 2021-09-05

Re: [PATCH] iwlwifi: pnvm: Fix a memory leak in 'iwl_pnvm_get_from_fs()'

From: Dan Carpenter <hidden>
Date: 2021-09-03 08:20:08
Also in: kernel-janitors, lkml, netdev

On Thu, Sep 02, 2021 at 10:38:11PM +0200, Christophe JAILLET wrote:
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 <redacted>
Reviewed-by: Dan Carpenter <redacted>

regards,
dan carpenter

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help