ソースを参照

qcacld-3.0: Add sta_id check before updating sta adapater array

Add sta_id check before updating sta adapater array

Change-Id: Ic2beadbf07d5071e2d9c69e04f178df39ab64136
CRs-Fixed: 2129645
Rajeev Kumar 7 年 前
コミット
4bc998faa6
1 ファイル変更2 行追加1 行削除
  1. 2 1
      core/hdd/src/wlan_hdd_assoc.c

+ 2 - 1
core/hdd/src/wlan_hdd_assoc.c

@@ -1729,7 +1729,8 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter,
 			sme_remove_bssid_from_scan_list(hdd_ctx->hHal,
 			sta_ctx->conn_info.bssId.bytes);
 		}
-		hdd_ctx->sta_to_adapter[sta_id] = NULL;
+		if (sta_id < HDD_MAX_ADAPTERS)
+			hdd_ctx->sta_to_adapter[sta_id] = NULL;
 	}
 	/* Clear saved connection information in HDD */
 	hdd_conn_remove_connect_info(sta_ctx);