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

Commit e56de246 authored by Yu Wang's avatar Yu Wang Committed by Lin Bai
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 7b344997
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -863,6 +863,13 @@ sme_rrm_issue_scan_req(struct mac_context *mac_ctx, uint8_t idx)
		struct wlan_objmgr_vdev *vdev;
		uint32_t freq;

		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;