qcacld-3.0: Fix NULL pointer de-reference in wma functions
Add null pointer check after malloc/utility function call in function:
* wma_update_tdls_peer_state
* wma_init_max_no_of_peers
* wma_mgmt_tx_completion_handler
* wma_ocb_set_config
* wma_roam_scan_offload_chan_list
* wma_roam_scan_filter
* wma_pno_start
* wma_start_extscan
Change-Id: I3c46ffe19e98146a5e96781a88295af88274a74f
CRs-Fixed: 1034255
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index 79b8e31..3ebbe3d 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -6481,6 +6481,12 @@
ch_mhz = qdf_mem_malloc(sizeof(uint32_t) *
peerStateParams->peerCap.peerChanLen);
+ if (ch_mhz == NULL) {
+ WMA_LOGE("%s: memory allocation failed", __func__);
+ ret = -ENOMEM;
+ goto end_tdls_peer_state;
+ }
+
for (i = 0; i < peerStateParams->peerCap.peerChanLen; ++i) {
ch_mhz[i] =
cds_chan_to_freq(peerStateParams->peerCap.peerChan[i].