mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-09 12:24:07 -05:00
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:
parent
c850ec6e18
commit
6d2f46df2c
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue