From 52ac4710fa74c7e647ffddbf2cb238dd69a6d7f4 Mon Sep 17 00:00:00 2001 From: Arun Kumar Khandavalli Date: Mon, 13 May 2019 15:21:48 +0530 Subject: [PATCH] qcacmn: Move osif priv deallocation to vdev destroy osif priv is allocated as part of the vdev object and freed as part of the logical vdev deletion. There is a race condition where in a component holding the reference to the vdev is trying to do an operation using the osif priv. But in the other thread osif priv can be freed. This can lead to null pointer exception. Hence, move the osif priv deletion to the vdev physical destroy. Change-Id: Iea3fd87cb272a51c5691ee2e39a590861c1b1637 CRs-Fixed: 2449996 --- umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c | 1 + 1 file changed, 1 insertion(+) diff --git a/umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c b/umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c index ead40271dbf0..f991fd6b39ee 100644 --- a/umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c +++ b/umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c @@ -107,6 +107,7 @@ static QDF_STATUS wlan_objmgr_vdev_obj_free(struct wlan_objmgr_vdev *vdev) qdf_mem_free(vdev->vdev_mlme.bss_chan); qdf_mem_free(vdev->vdev_mlme.des_chan); + qdf_mem_free(vdev->vdev_nif.osdev); qdf_mem_free(vdev); return QDF_STATUS_SUCCESS;