Skip to content

Commit a60a1e5

Browse files
krish2718carlescufi
authored andcommitted
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>
1 parent 3d8ae60 commit a60a1e5

File tree

1 file changed

+2
-3
lines changed
  • drivers/wifi/nrf700x/src

1 file changed

+2
-3
lines changed

drivers/wifi/nrf700x/src/shim.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,8 @@ static void *zep_shim_nbuf_alloc(unsigned int size)
238238

239239
static void zep_shim_nbuf_free(void *nbuf)
240240
{
241-
struct nwb *nwb;
242-
243-
nwb = nbuf;
241+
if (!nbuf)
242+
return;
244243

245244
k_free(((struct nwb *)nbuf)->priv);
246245

0 commit comments

Comments
 (0)