From 0cc9327e43991c4bf6a0c80cff34e08cccf01ac1 Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Thu, 16 Jul 2020 23:51:04 +0530 Subject: [PATCH] qcacld-3.0: Validate pcl_req in wlan_cm_roam_send_set_vdev_pcl() In wlan_cm_roam_send_set_vdev_pcl(), pcl_req intially checked for NULL can be dereferenced later. Validate pcl_req and return error if pcl_req is NULL. Change-Id: Iccc4e09c636d2643c319a1767bf8f673d6d36a80 CRs-Fixed: 2734082 --- .../mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c index 99405f7883ce..1fb4e50aac3a 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c +++ b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c @@ -45,7 +45,7 @@ wlan_cm_roam_send_set_vdev_pcl(struct wlan_objmgr_psoc *psoc, * If vdev_id is WLAN_UMAC_VDEV_ID_MAX, then PDEV pcl command * needs to be sent */ - if (pcl_req && pcl_req->vdev_id == WLAN_UMAC_VDEV_ID_MAX) + if (!pcl_req || pcl_req->vdev_id == WLAN_UMAC_VDEV_ID_MAX) return QDF_STATUS_E_FAILURE; status = ucfg_mlme_get_band_capability(psoc, &band_capability);