Browse Source

qcacmn: Fix static analysis issue in MLO disconnect API

Fix static analysis issue in MLO disconnect API

Change-Id: Ibf7b82e4805a81d2d32ea2bfa82a8e1f3756867c
CRs-Fixed: 3140790
Himanshu Batra 3 years ago
parent
commit
8da6f58098
1 changed files with 4 additions and 4 deletions
  1. 4 4
      umac/mlo_mgr/src/wlan_mlo_mgr_sta.c

+ 4 - 4
umac/mlo_mgr/src/wlan_mlo_mgr_sta.c

@@ -842,9 +842,9 @@ QDF_STATUS mlo_disconnect(struct wlan_objmgr_vdev *vdev,
 		copied_conn_req_lock_release(sta_ctx);
 	}
 
-	if (wlan_vdev_mlme_is_mlo_vdev(vdev)) {
+	if (mlo_dev_ctx && wlan_vdev_mlme_is_mlo_vdev(vdev)) {
 		mlo_dev_lock_acquire(mlo_dev_ctx);
-		if (sta_ctx->connect_req) {
+		if (sta_ctx && sta_ctx->connect_req) {
 			mlo_free_connect_ies(sta_ctx->connect_req);
 			qdf_mem_free(sta_ctx->connect_req);
 			sta_ctx->connect_req = NULL;
@@ -884,8 +884,8 @@ QDF_STATUS mlo_sync_disconnect(struct wlan_objmgr_vdev *vdev,
 		copied_conn_req_lock_release(sta_ctx);
 	}
 
-	if (wlan_vdev_mlme_is_mlo_vdev(vdev)) {
-		if (sta_ctx->connect_req) {
+	if (mlo_dev_ctx && wlan_vdev_mlme_is_mlo_vdev(vdev)) {
+		if (sta_ctx && sta_ctx->connect_req) {
 			mlo_free_connect_ies(sta_ctx->connect_req);
 			qdf_mem_free(sta_ctx->connect_req);
 			sta_ctx->connect_req = NULL;