]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: Fix memory leaks in error handling path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 11 Nov 2021 07:23:11 +0000 (08:23 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 22 Nov 2021 18:39:16 +0000 (20:39 +0200)
commitc2a3b3ffbe0e675bafe8664866f031fc8c6b6cf4
treeec4a9f0151ed9071b0cb4013a745875a92c059d8
parent440e11e4d4ff075918639e69cbf699c1cc0f952a
iwlwifi: Fix memory leaks in error handling path

Should an error occur (invalid TLV len or memory allocation failure), the
memory already allocated in 'reduce_power_data' should be freed before
returning, otherwise it is leaking.

Fixes: 17c750683de6 ("iwlwifi: support loading the reduced power table from UEFI")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1504cd7d842d13ddb8244e18004523128d5c9523.1636615284.git.christophe.jaillet@wanadoo.fr
drivers/net/wireless/intel/iwlwifi/fw/uefi.c