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:
parent
5c8f1807c1
commit
9c36d97646
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue