Browse Source

qcacld-3.0: Do not release vdev reference if vdev is NULL

In wlan_cm_get_associated_ch_width, if vdev is NULL, which means
reference is not gotten. do not call wlan_objmgr_vdev_release_ref.
Otherwise there is QDF ASSERT.

Change-Id: Id1cc2be3869ad555ebeb1c91a4b5f75d499e70ac
CRs-Fixed: 3503877
Bing Sun 1 year ago
parent
commit
b1586c23fb

+ 2 - 1
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c

@@ -2130,7 +2130,7 @@ wlan_cm_get_associated_ch_width(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
 
 	if (!vdev) {
 		mlme_err("vdev%d: vdev object is NULL", vdev_id);
-		goto release;
+		goto ret;
 	}
 
 	mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
@@ -2141,6 +2141,7 @@ wlan_cm_get_associated_ch_width(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
 	mlme_debug("vdev %d: associated_ch_width:%d", vdev_id, ch_width);
 release:
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
+ret:
 	return ch_width;
 }