Skip to content

Commit 5f59c23

Browse files
committed
raw_tx: Fix memory leak in case of a failure
In case of failure the FMAC API is supposed to handle network buffer free like we do in the normal case. Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
1 parent 3d5cfa5 commit 5f59c23

File tree

1 file changed

+4
-0
lines changed
  • fw_if/umac_if/src/system

1 file changed

+4
-0
lines changed

fw_if/umac_if/src/system/tx.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1967,6 +1967,10 @@ enum nrf_wifi_status nrf_wifi_fmac_start_rawpkt_xmit(void *dev_ctx,
19671967

19681968
return NRF_WIFI_STATUS_SUCCESS;
19691969
fail:
1970+
if (nwb) {
1971+
nrf_wifi_osal_nbuf_free(nwb);
1972+
}
1973+
19701974
if (sys_dev_ctx) {
19711975
sys_dev_ctx->raw_pkt_stats.raw_pkt_send_failure += 1;
19721976
}

0 commit comments

Comments
 (0)