Forráskód Böngészése

qcacld-3.0: Validate suspecious pointer dereference

Add NULL check before dereferencing wma handle in
wma_ipa_uc_stat_request().

Change-Id: If336af0c350fa5615aeb9481ef6d759811e09f59
CRs-Fixed: 2047207
Sreelakshmi Konamki 8 éve
szülő
commit
7a57408999
1 módosított fájl, 5 hozzáadás és 0 törlés
  1. 5 0
      core/wma/src/wma_main.c

+ 5 - 0
core/wma/src/wma_main.c

@@ -7628,6 +7628,11 @@ void wma_ipa_uc_stat_request(wma_cli_set_cmd_t *privcmd)
 {
 	tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
 
+	if (!wma) {
+		WMA_LOGE("%s: Failed to get wma", __func__);
+		return;
+	}
+
 	if (wma_set_priv_cfg(wma, privcmd))
 		WMA_LOGE("Failed to set wma priv congiuration");
 }