Эх сурвалжийг харах

qcacmn: Add null pointer handling in cm_get_first_roam_command

Add null check for the cm_ctx in cm_get_first_roam_command.

Change-Id: I1c9a666d845936e24c87d5560b158febb9ccc854
CRs-Fixed: 2929651
Abhishek Singh 4 жил өмнө
parent
commit
7f449d83f1

+ 2 - 0
umac/mlme/connection_mgr/core/src/wlan_cm_roam_util.c

@@ -213,6 +213,8 @@ struct cm_roam_req *cm_get_first_roam_command(struct wlan_objmgr_vdev *vdev)
 	uint32_t cm_id_prefix;
 
 	cm_ctx = cm_get_cm_ctx(vdev);
+	if (!cm_ctx)
+		return NULL;
 
 	cm_req_lock_acquire(cm_ctx);
 	qdf_list_peek_front(&cm_ctx->req_list, &cur_node);