qcacmn: Set osif priv to NULL when vdev comp object create fails
In the normal execution osif priv is freed when the object manager is freed. Whenever there is a error w.r.t to creation of vdev, osifpriv is deleted as part of vdev destroy. When this error propagated to caller. Caller tries to again free the osif_priv in the error path. Hence set osif priv to NULL in error case to prevent any double free by caller. Change-Id: Iaa074ad39aa473e99ab2fd7b14194422f19c168d CRs-Fixed: 2467327
This commit is contained in:

committed by
nshrivas

parent
6a2601a26c
commit
e454174cf6
@@ -249,6 +249,11 @@ struct wlan_objmgr_vdev *wlan_objmgr_vdev_obj_create(
|
||||
wlan_objmgr_vdev_obj_delete(vdev);
|
||||
obj_mgr_err("VDEV comp objects creation failed for vdev-id:%d",
|
||||
vdev->vdev_objmgr.vdev_id);
|
||||
/*
|
||||
* Set params osifp to NULL as it is freed during vdev obj
|
||||
* delete, This prevents caller from performing double free.
|
||||
*/
|
||||
params->osifp = NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user