mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacld-3.0: Handle NULL pdev in cds_flush_cache_rx_queue()
Currently cds_flush_cache_rx_queue() does not verify that cds_get_context() returns a valid pdev which could subsequently lead to dereferencing an invalid pointer. Add a validity check for this pointer. Change-Id: I326e0b92205fda78854c947248e675d287a7ec04 CRs-Fixed: 1082035 (cherry picked from commit 514e12df3c66ef0e457d76ef8c984874481f5117)
This commit is contained in:
parent
02a1276b1f
commit
28b7151d8d
1 changed files with 5 additions and 1 deletions
|
|
@ -836,7 +836,11 @@ void cds_flush_cache_rx_queue(void)
|
|||
{
|
||||
uint8_t sta_id;
|
||||
struct ol_txrx_peer_t *peer;
|
||||
struct ol_txrx_pdev_t *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
struct ol_txrx_pdev_t *pdev;
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
if (!pdev)
|
||||
return;
|
||||
|
||||
for (sta_id = 0; sta_id < WLAN_MAX_STA_COUNT; sta_id++) {
|
||||
peer = ol_txrx_peer_find_by_local_id(pdev, sta_id);
|
||||
|
|
|
|||
Loading…
Reference in a new issue