* [PATCH] iwlwifi: dbg_ini: fix memory leak in alloc_sgtable
@ 2019-09-13 4:23 Navid Emamdoost
2019-09-30 6:25 ` Luca Coelho
0 siblings, 1 reply; 2+ messages in thread
From: Navid Emamdoost @ 2019-09-13 4:23 UTC (permalink / raw)
Cc: emamd001, smccaman, kjlu, Navid Emamdoost, Johannes Berg,
Emmanuel Grumbach, Luca Coelho, Intel Linux Wireless, Kalle Valo,
David S. Miller, Shahar S Matityahu, Sara Sharon, linux-wireless,
netdev, linux-kernel
In alloc_sgtable if alloc_page fails, the alocated table should be
released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
---
drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
index 4d81776f576d..db41abb3361d 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -643,6 +643,7 @@ static struct scatterlist *alloc_sgtable(int size)
if (new_page)
__free_page(new_page);
}
+ kfree(table);
return NULL;
}
alloc_size = min_t(int, size, PAGE_SIZE);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iwlwifi: dbg_ini: fix memory leak in alloc_sgtable
2019-09-13 4:23 [PATCH] iwlwifi: dbg_ini: fix memory leak in alloc_sgtable Navid Emamdoost
@ 2019-09-30 6:25 ` Luca Coelho
0 siblings, 0 replies; 2+ messages in thread
From: Luca Coelho @ 2019-09-30 6:25 UTC (permalink / raw)
To: Navid Emamdoost
Cc: emamd001, smccaman, kjlu, Johannes Berg, Emmanuel Grumbach,
Intel Linux Wireless, Kalle Valo, David S. Miller,
Shahar S Matityahu, Sara Sharon, linux-wireless, netdev,
linux-kernel
On Thu, 2019-09-12 at 23:23 -0500, Navid Emamdoost wrote:
> In alloc_sgtable if alloc_page fails, the alocated table should be
> released.
>
> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
> ---
> drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 1 +
> 1 file changed, 1 insertion(+)
Thanks, Navid! I have applied this to our internal tree and it will
reach the mainline following our usual upstreaming process.
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-30 6:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-13 4:23 [PATCH] iwlwifi: dbg_ini: fix memory leak in alloc_sgtable Navid Emamdoost
2019-09-30 6:25 ` Luca Coelho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).