diff options
| author | Srinivas Girigowda <sgirigow@qca.qualcomm.com> | 2016-04-18 19:20:13 -0700 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-04-20 14:22:19 +0530 |
| commit | d76d6683123ea7337ff21a4f31ec77406df52097 (patch) | |
| tree | b1208c61f1f53437d08b4cc4c5b68282c0bf57cb | |
| parent | a9d3a8393ed0b65f6db0fb58bdf2ec5af63d85a5 (diff) | |
qcacld-2.0: Add NULL check in radio_tx_power_stats
Add a NULL check in radio_tx_power_stats.
Change-Id: I66aea57e124551dcbd94a62309cdeec5207ad6f5
CRs-Fixed: 992365
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index c1424509b6ac..93d369107fdc 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -4736,6 +4736,11 @@ static int wma_unified_radio_tx_power_level_stats_event_handler(void *handle, } link_stats_results = wma_handle->link_stats_results; + if (!link_stats_results) { + WMA_LOGA("%s: link_stats_results is NULL", __func__); + return -EINVAL; + } + rs_results = (tSirWifiRadioStat *) &link_stats_results->results[0]; tx_power_level_values = (uint8 *) param_tlvs->tx_time_per_power_level; @@ -4785,8 +4790,8 @@ post_stats: link_stats_results); WMA_LOGD("%s: Radio Stats event posted to HDD", __func__); vos_mem_free(rs_results->tx_time_per_power_level); - vos_mem_free(wma_handle->link_stats_results); rs_results->tx_time_per_power_level = NULL; + vos_mem_free(wma_handle->link_stats_results); wma_handle->link_stats_results = NULL; return 0; |
