Sfoglia il codice sorgente

qcacmn: Fix null pointer dereference

Fix NULL pointer dereference issue for CFR private object in the
"target_if_cfr_update_global_cfg" API.

Change-Id: Ieac9df08c0e14b6c65f8d974f7f1f1220a3b8008
CRs-Fixed: 3772912
Rahul Gusain 1 anno fa
parent
commit
f5a0f79275
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 6 1
      target_if/cfr/src/target_if_cfr_enh.c

+ 6 - 1
target_if/cfr/src/target_if_cfr_enh.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -2557,6 +2557,11 @@ void target_if_cfr_update_global_cfg(struct wlan_objmgr_pdev *pdev)
 	pcfr = wlan_objmgr_pdev_get_comp_private_obj(pdev,
 						     WLAN_UMAC_COMP_CFR);
 
+	if (!pcfr) {
+		target_if_err("pcfr is null");
+		return;
+	}
+
 	for (grp_id = 0; grp_id < MAX_TA_RA_ENTRIES; grp_id++) {
 		if (qdf_test_bit(grp_id,
 				 &pcfr->rcc_param.modified_in_curr_session)) {