From f0e1361efe801b0e191198e7fb03be4af87f1f9a Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Thu, 31 May 2018 17:28:24 -0700 Subject: [PATCH] qcacmn: Do not take PSOC ref count during PSOC create notification Do not take a common object ref count during common object create notification because until common object destroy notification is not received the ref count will not be released and in this case ref count will never be released becasue object destory notification will never come. takign ref coutn from object create notification will always lead to object leak. Change-Id: Iab7da602ef2d627866c3353b978eaa63749b62dd CRs-Fixed: 2252274 --- umac/wifi_pos/src/wifi_pos_utils.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/umac/wifi_pos/src/wifi_pos_utils.c b/umac/wifi_pos/src/wifi_pos_utils.c index 1a7ac0ff58..ce7a9adac4 100644 --- a/umac/wifi_pos/src/wifi_pos_utils.c +++ b/umac/wifi_pos/src/wifi_pos_utils.c @@ -65,11 +65,8 @@ void wifi_pos_set_psoc(struct wlan_objmgr_psoc *psoc) qdf_spin_lock_bh(&psoc_ptr_lock); tmp = wifi_pos_psoc_obj; - if (!wifi_pos_psoc_obj) { + if (!wifi_pos_psoc_obj) wifi_pos_psoc_obj = psoc; - wlan_objmgr_psoc_get_ref(wifi_pos_psoc_obj, - WLAN_WIFI_POS_CORE_ID); - } qdf_spin_unlock_bh(&psoc_ptr_lock); if (tmp) @@ -82,11 +79,8 @@ void wifi_pos_clear_psoc(void) qdf_spin_lock_bh(&psoc_ptr_lock); tmp = wifi_pos_psoc_obj; - if (wifi_pos_psoc_obj) { - wlan_objmgr_psoc_release_ref(wifi_pos_psoc_obj, - WLAN_WIFI_POS_CORE_ID); + if (wifi_pos_psoc_obj) wifi_pos_psoc_obj = NULL; - } qdf_spin_unlock_bh(&psoc_ptr_lock); if (!tmp)