qcacld-3.0: Add null check in lim_populate_vht_mcs_set() API

session_entry pointer has been dereferenced without checking against
NULL.

Add NULL check before dereferencing it.

CRs-Fixed: 2232738
Change-Id: I899a5da2affd70acf274bdceca11e9d47c7659b5
This commit is contained in:
Krunal Soni 2018-05-03 14:09:47 -07:00 • committed by nshrivas
commit 3e4a3b62f7

View file

@ -1388,7 +1388,7 @@ tSirRetStatus lim_populate_vht_mcs_set(tpAniSirGlobal mac_ctx,
VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
rates->vhtRxHighestDataRate =
VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
if (!session_entry->ch_width &&
if (session_entry && !session_entry->ch_width &&
!mac_ctx->roam.configParam.enable_vht20_mcs9 &&
((rates->vhtRxMCSMap & VHT_1x1_MCS_MASK) ==
VHT_1x1_MCS9_MAP)) {
@ -1398,7 +1398,7 @@ tSirRetStatus lim_populate_vht_mcs_set(tpAniSirGlobal mac_ctx,
NSS_1x1_MODE);
}
} else {
if (!session_entry->ch_width &&
if (session_entry && !session_entry->ch_width &&
!mac_ctx->roam.configParam.enable_vht20_mcs9 &&
((rates->vhtRxMCSMap & VHT_2x2_MCS_MASK) ==
VHT_2x2_MCS9_MAP)) {