qcacld-3.0: Free sta_self_wmi_rsp if WMA_DELETE_STA_REQ is not queued
In wma_self_peer_remove, sta_self_wmi_rsp is allocated and sent as params to wma_fill_hold_req for WMA_DELETE_STA_REQ. However, if wma_fill_hold_req fails and returns NULL, the memory allocated for sta_self_wmi_rsp is not freed leading to memory leak. Free sta_self_wmi_rsp in the error handling case for wma_fill_hold_req in wma_self_peer_remove. Change-Id: I8df840b39284e00a8c8be114c0fec13c3c199fc6 CRs-Fixed: 2334580
This commit is contained in:
@@ -551,6 +551,7 @@ static QDF_STATUS wma_self_peer_remove(tp_wma_handle wma_handle,
|
||||
vdev_id);
|
||||
wma_remove_req(wma_handle, vdev_id,
|
||||
WMA_DEL_P2P_SELF_STA_RSP_START);
|
||||
qdf_mem_free(sta_self_wmi_rsp);
|
||||
qdf_status = QDF_STATUS_E_FAILURE;
|
||||
goto error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user