From 80e16bfe839b952ac0140c44a161b5814d4d79e8 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Sirasanagandla Date: Tue, 21 Aug 2018 20:55:25 +0530 Subject: [PATCH] qcacld-3.0: Add null check in action oui send request In target_if_action_oui_send_req(), there is no NULL check against return value of GET_WMI_HDL_FROM_PSOC() which can result in NULL pointer exception. Therefore, add NULL check. Change-Id: Ibbc4fdf03563496b9d5dac63141921dd8bdea4fa CRs-Fixed: 2299793 --- .../target_if/action_oui/src/target_if_action_oui.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/components/target_if/action_oui/src/target_if_action_oui.c b/components/target_if/action_oui/src/target_if_action_oui.c index 1627e59b0c48..4893b633e16c 100644 --- a/components/target_if/action_oui/src/target_if_action_oui.c +++ b/components/target_if/action_oui/src/target_if_action_oui.c @@ -28,10 +28,15 @@ static QDF_STATUS target_if_action_oui_send_req(struct wlan_objmgr_psoc *psoc, - struct action_oui_request *req) + struct action_oui_request *req) { - return wmi_unified_send_action_oui_cmd(GET_WMI_HDL_FROM_PSOC(psoc), - req); + void *wmi_hdl; + + wmi_hdl = GET_WMI_HDL_FROM_PSOC(psoc); + if (!wmi_hdl) + return QDF_STATUS_E_FAILURE; + + return wmi_unified_send_action_oui_cmd(wmi_hdl, req); } void