mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-16 17:52:46 -04:00
qcacld-3.0: Fix Null pointer dereference issue
Add null check for context in cds_get_connectivity_stats_pkt_bitmap and cds_get_arp_stats_gw_ip to avoid Null dereferencing. Change-Id: I3481508ee62f630b9db580fdf7d73821733d1599 CRs-Fixed: 2191518
This commit is contained in:
parent
9c2cd26faa
commit
fa826fdba9
1 changed files with 9 additions and 1 deletions
|
|
@ -2780,6 +2780,9 @@ uint32_t cds_get_connectivity_stats_pkt_bitmap(void *context)
|
|||
{
|
||||
struct hdd_adapter *adapter = NULL;
|
||||
|
||||
if (!context)
|
||||
return 0;
|
||||
|
||||
adapter = (struct hdd_adapter *)context;
|
||||
if (unlikely(adapter->magic != WLAN_HDD_ADAPTER_MAGIC)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_ERROR,
|
||||
|
|
@ -2797,7 +2800,12 @@ uint32_t cds_get_connectivity_stats_pkt_bitmap(void *context)
|
|||
*/
|
||||
uint32_t cds_get_arp_stats_gw_ip(void *context)
|
||||
{
|
||||
struct hdd_adapter *adapter = (struct hdd_adapter *)context;
|
||||
struct hdd_adapter *adapter = NULL;
|
||||
|
||||
if (!context)
|
||||
return 0;
|
||||
|
||||
adapter = (struct hdd_adapter *)context;
|
||||
|
||||
if (unlikely(adapter->magic != WLAN_HDD_ADAPTER_MAGIC)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_ERROR,
|
||||
|
|
|
|||
Loading…
Reference in a new issue