mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
qcacld-3.0: Fix potential static code analysis issues
Fix potential null pointer access during sap open session and validation of the session id which could be reported during static code analysis. Change-Id: I6146c7223c586df06c08c76abd9e38a3c1ad1c4b CRs-Fixed: 979960
This commit is contained in:
parent
6e9aa1b9cd
commit
d3cb4778fe
2 changed files with 9 additions and 1 deletions
|
|
@ -201,6 +201,12 @@ QDF_STATUS wlansap_start(void *pCtx, enum tQDF_ADAPTER_MODE mode,
|
|||
}
|
||||
|
||||
hal = (tHalHandle) CDS_GET_HAL_CB(pSapCtx->p_cds_gctx);
|
||||
if (!hal) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid HAL pointer", __func__);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
qdf_ret_status = sap_open_session(hal, pSapCtx, session_id);
|
||||
|
||||
if (QDF_STATUS_SUCCESS != qdf_ret_status) {
|
||||
|
|
|
|||
|
|
@ -15130,7 +15130,9 @@ bool sme_is_session_id_valid(tHalHandle hal, uint32_t session_id)
|
|||
{
|
||||
tpAniSirGlobal mac = PMAC_STRUCT(hal);
|
||||
if (!mac) {
|
||||
sms_log(mac, LOGE, FL("null mac pointer"));
|
||||
/* Using QDF_TRACE since mac is not available for sms_log */
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: null mac pointer", __func__);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue