Browse Source

qcacld-3.0: Release vdev ref gracefully

In function hdd_nan_sr_concurrency_update, the FOR iteration has
released the vdev ref if is_sr_enabled is false, but it does not
set sta_vdev to NULL. It causes the last sta_vdev ref count release
again and this causes issue of releasing ref count which was not taken.

Change-Id: Ia218073b4ef2508cd78370bb4236790df9b5ee4f
CRs-Fixed: 3363355
Paul Zhang 2 years ago
parent
commit
d972751a54
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/hdd/src/wlan_hdd_nan.c

+ 1 - 1
core/hdd/src/wlan_hdd_nan.c

@@ -236,7 +236,7 @@ void hdd_nan_sr_concurrency_update(struct nan_event_params *nan_evt)
 		}
 	}
 exit:
-	if (sta_vdev)
+	if (sta_vdev && is_sr_enabled)
 		wlan_objmgr_vdev_release_ref(sta_vdev, WLAN_OSIF_ID);
 }
 #endif