Browse Source

qcacmn: Initialize reg_cap in init_deinit_populate_phy_reg_cap

Initialize local array reg_cap in init_deinit_populate_phy_reg_cap
to avoid accessing uninitialized fields in the array.

Change-Id: I9afb8d47cc12b3d1626aa64a52f9583d45df5f34
CRs-Fixed: 2232822
Tushnim Bhattacharyya 6 years ago
parent
commit
5539b45b88
1 changed files with 1 additions and 1 deletions
  1. 1 1
      target_if/init_deinit/src/service_ready_util.c

+ 1 - 1
target_if/init_deinit/src/service_ready_util.c

@@ -310,7 +310,7 @@ int init_deinit_populate_phy_reg_cap(struct wlan_objmgr_psoc *psoc,
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	struct wlan_psoc_hal_reg_capability cap;
 	struct wlan_psoc_host_hal_reg_capabilities_ext
-				reg_cap[PSOC_MAX_PHY_REG_CAP];
+				reg_cap[PSOC_MAX_PHY_REG_CAP] = {{0} };
 
 	if (service_ready) {
 		status = wmi_extract_hal_reg_cap(handle, event, &cap);