drivers: wifi: Fix TX buffers leak

During interface down in case TX has pending buffers in either TXQ or
Pending_Q then they are not freed instead the Q itself is freed.

Fix by traversing the Q and freeing all members.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This commit is contained in:
Chaitanya Tata 2024-07-18 01:02:57 +05:30 committed by Carles Cufí
parent 5c8f1807c1
commit 9c36d97646

View file

@ -235,6 +235,10 @@ static void *zep_shim_nbuf_alloc(unsigned int size)
static void zep_shim_nbuf_free(void *nbuf)
{
if (!nbuf) {
return;
}
k_free(((struct nwb *)nbuf)->priv);
k_free(nbuf);
}