From bcbde36363860578ff41a249a3e6f3a677da1a54 Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Mon, 11 Dec 2017 21:11:53 +0530 Subject: [PATCH] qcacld-3.0: Add check for iface in wma_setup_install_key_cmd The host defines the iface ptr with :- iface = &wma_handle->interfaces[key_params->vdev_id], at line 1588 and if the WLAN_FEATURE_11W, is not enabled , the host sets the iface->is_waiting_for_key as false , without a NULL check of iface. Fix is to add a NULL check for iface Change-Id: I69ed8f881b678458d16f1f74e87e31959c04ec63 CRs-Fixed: 2156921 --- core/wma/src/wma_mgmt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index db9786310753..eccf84e17452 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -1807,7 +1807,8 @@ static QDF_STATUS wma_setup_install_key_cmd(tp_wma_handle wma_handle, } /* install key was requested */ - iface->is_waiting_for_key = false; + if (iface) + iface->is_waiting_for_key = false; end: qdf_mem_free(params.key_rsc_counter);