From 058c19c08b8dabccab798265b080fd5c1f788bfe Mon Sep 17 00:00:00 2001 From: Priyadarshnee Srinivasan Date: Tue, 14 Feb 2023 10:17:31 +0530 Subject: [PATCH] qcacmn: Do not use a stack variable uninitialized In reg_is_chan_supported() API, the stack object chan_list is uninitialized and is used by channel search API. The puncture pattern inside the chan_list is set to a random value and it causes channel find failure. CRs-Fixed: 3402977 Change-Id: Icec8e5f207d3d8bfb5a01dafe8aa6adc5bc18a9d --- umac/regulatory/core/src/reg_opclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umac/regulatory/core/src/reg_opclass.c b/umac/regulatory/core/src/reg_opclass.c index b3711387c5..8a1d39b7d7 100644 --- a/umac/regulatory/core/src/reg_opclass.c +++ b/umac/regulatory/core/src/reg_opclass.c @@ -1577,7 +1577,7 @@ static bool reg_is_chan_supported(struct wlan_objmgr_pdev *pdev, enum phy_ch_width ch_width, enum supported_6g_pwr_types in_6g_pwr_mode) { - struct reg_channel_list chan_list; + struct reg_channel_list chan_list = {0}; qdf_freq_t center_320; struct ch_params ch_params = {0};