Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af64d7d7 authored by Jingxiang Ge's avatar Jingxiang Ge Committed by nshrivas
Browse files

qcacmn: Fix kw issue in target_if_nan_register_events

Potential NULL pointer dereference of handle in
target_if_nan_register_events.

Add null check in the function.

Change-Id: I1fc57d712713bc47345b178c972cc5fc926a42d0
CRs-Fixed: 2317017
parent 615c4da4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -671,6 +671,10 @@ QDF_STATUS target_if_nan_register_events(struct wlan_objmgr_psoc *psoc)
	int ret;
	wmi_unified_t handle = get_wmi_unified_hdl_from_psoc(psoc);

	if (!handle) {
		target_if_err("handle is NULL");
		return QDF_STATUS_E_FAILURE;
	}
	ret = wmi_unified_register_event_handler(handle,
		wmi_ndp_initiator_rsp_event_id,
		target_if_ndp_initiator_rsp_handler,