Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0950a2b authored by Yu Wang's avatar Yu Wang Committed by Madan Koyyalamudi
Browse files

qcacld-3.0: Add sanity check for RRM global channel list

Add sanity check for RRM global channel list to avoid
possible NULL-Pointer issue.

Change-Id: Icfbf5282304a549a0dc92889f83cb1a31dde15b2
CRs-Fixed: 2972194
parent 0cb8da6e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -807,6 +807,13 @@ QDF_STATUS sme_rrm_issue_scan_req(struct mac_context *mac_ctx, uint8_t idx)
		uint16_t i;
		char *chan_buff = NULL;

		if (!sme_rrm_ctx->channelList.numOfChannels ||
		    !sme_rrm_ctx->channelList.freq_list) {
			sme_err("[802.11 RRM]: Global freq list is null");
			status = QDF_STATUS_E_FAILURE;
			goto send_ind;
		}

		req = qdf_mem_malloc(sizeof(*req));
		if (!req) {
			status = QDF_STATUS_E_NOMEM;