qcacmn: Fix potential nbuf memory leak if mmap fails
Make sure free the allocated nbuf if we fail to memory map it. Change-Id: I90606ab088fc093b390644478bccc77f08800cd5 CRs-Fixed: 2142469
This commit is contained in:

committed by
snandini

parent
c850ec6e18
commit
6d2f46df2c
@@ -170,7 +170,8 @@ QDF_STATUS dp_rx_buffers_replenish(struct dp_soc *dp_soc, uint32_t mac_id,
|
||||
|
||||
ret = qdf_nbuf_map_single(dp_soc->osdev, rx_netbuf,
|
||||
QDF_DMA_BIDIRECTIONAL);
|
||||
if (ret == QDF_STATUS_E_FAILURE) {
|
||||
if (qdf_unlikely(ret == QDF_STATUS_E_FAILURE)) {
|
||||
qdf_nbuf_free(rx_netbuf);
|
||||
DP_STATS_INC(dp_pdev, replenish.map_err, 1);
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user