Browse Source

qcacld-3.0: Validate wma handle before using it

Validate wma handle before using it

Change-Id: I3c78a21bc515422d5443bdac7c2fc897e6d51cff
CRs-Fixed: 2668303
Jianmin Zhu 5 years ago
parent
commit
6f122afe83
1 changed files with 5 additions and 0 deletions
  1. 5 0
      core/mac/src/pe/lim/lim_process_mlm_req_messages.c

+ 5 - 0
core/mac/src/pe/lim/lim_process_mlm_req_messages.c

@@ -196,6 +196,11 @@ lim_mlm_add_bss(struct mac_context *mac_ctx,
 	tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
 	struct bss_params *addbss_param = NULL;
 
+	if (!wma) {
+		pe_err("Invalid wma handle");
+		return eSIR_SME_INVALID_PARAMETERS;
+	}
+
 	mlme_obj = wlan_vdev_mlme_get_cmpt_obj(vdev);
 	if (!mlme_obj) {
 		pe_err("vdev component object is NULL");