From 1b80f4f622ba39c2595877ca46f352b36c1d3080 Mon Sep 17 00:00:00 2001 From: Balaji Pothunoori Date: Mon, 29 Apr 2024 22:32:39 +0530 Subject: [PATCH] qcacld-3.0: initialize structure parameters before use Currently bool values are not initialized and results in unexpected values for bool variables, Hence this change is to initialize structure to NULL before use. Change-Id: I07ec3880d35441d3dc84eaa44640ad07eba0b3c9 CRs-Fixed: 3800965 --- .../cmn_services/interface_mgr/src/wlan_if_mgr_roam.c | 2 +- core/hdd/src/wlan_hdd_hostapd.c | 2 +- core/mac/src/pe/lim/lim_assoc_utils.c | 2 +- core/mac/src/pe/lim/lim_process_sme_req_messages.c | 6 +++--- core/mac/src/pe/lim/lim_utils.c | 2 +- core/wma/src/wma_features.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/cmn_services/interface_mgr/src/wlan_if_mgr_roam.c b/components/cmn_services/interface_mgr/src/wlan_if_mgr_roam.c index 3a546333da..59bdd3b490 100644 --- a/components/cmn_services/interface_mgr/src/wlan_if_mgr_roam.c +++ b/components/cmn_services/interface_mgr/src/wlan_if_mgr_roam.c @@ -801,7 +801,7 @@ static void if_mgr_update_candidate(struct wlan_objmgr_psoc *psoc, struct validate_bss_data *candidate_info) { struct scan_cache_entry *scan_entry = candidate_info->scan_entry; - struct action_oui_search_attr attr; + struct action_oui_search_attr attr = {0}; int8_t i, allowed_partner_links = 0; uint8_t mlo_support_link_num; diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index b2e59afa50..738ec12fc9 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -1897,7 +1897,7 @@ hdd_hostapd_update_beacon_country_ie(struct hdd_adapter *adapter) struct hdd_station_info *sta_info, *tmp = NULL; struct hdd_context *hdd_ctx; struct hdd_ap_ctx *ap_ctx; - struct action_oui_search_attr attr; + struct action_oui_search_attr attr = {0}; QDF_STATUS status; bool found = false; diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 6e269974d5..3f594862d7 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -3690,7 +3690,7 @@ lim_limit_bw_for_iot_ap(struct mac_context *mac_ctx, struct pe_session *session, struct bss_description *bss_desc) { - struct action_oui_search_attr vendor_ap_search_attr; + struct action_oui_search_attr vendor_ap_search_attr = {0}; uint16_t ie_len; ie_len = wlan_get_ielen_from_bss_description(bss_desc); diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index cbbd8eec13..18fa44aadc 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -1792,7 +1792,7 @@ static void lim_check_oui_and_update_session(struct mac_context *mac_ctx, struct pe_session *session, tDot11fBeaconIEs *ie_struct) { - struct action_oui_search_attr vendor_ap_search_attr; + struct action_oui_search_attr vendor_ap_search_attr = {0}; uint16_t ie_len; bool follow_ap_edca; struct bss_description *bss_desc = @@ -3155,7 +3155,7 @@ bool lim_enable_cts_to_self_for_exempted_iot_ap( uint8_t *ie_ptr, uint16_t ie_len) { - struct action_oui_search_attr vendor_ap_search_attr; + struct action_oui_search_attr vendor_ap_search_attr = {0}; vendor_ap_search_attr.ie_data = ie_ptr; vendor_ap_search_attr.ie_length = ie_len; @@ -3186,7 +3186,7 @@ lim_disable_bformee_for_iot_ap(struct mac_context *mac_ctx, struct pe_session *session, struct bss_description *bss_desc) { - struct action_oui_search_attr vendor_ap_search_attr; + struct action_oui_search_attr vendor_ap_search_attr = {0}; uint16_t ie_len; ie_len = wlan_get_ielen_from_bss_description(bss_desc); diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index b36428cfc7..9101377d1a 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -7132,7 +7132,7 @@ void lim_intersect_sta_he_caps(struct mac_context *mac_ctx, static bool lim_is_vendor_htc_he_ap(struct bss_description *bss_desc) { - struct action_oui_search_attr vendor_ap_search_attr; + struct action_oui_search_attr vendor_ap_search_attr = {0}; uint16_t ie_len; ie_len = wlan_get_ielen_from_bss_description(bss_desc); diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index c71e0420a0..0248caa146 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -5833,7 +5833,7 @@ int wma_chan_info_event_handler(void *handle, uint8_t *event_buf, uint32_t len) tp_wma_handle wma = (tp_wma_handle)handle; WMI_CHAN_INFO_EVENTID_param_tlvs *param_buf; wmi_chan_info_event_fixed_param *event; - struct scan_chan_info buf; + struct scan_chan_info buf = {0}; struct mac_context *mac = NULL; struct channel_status *channel_status; bool snr_monitor_enabled;