Initialize the variables before using it in channel update

seg0 and seg1 variables can have any initial value, but they may cause
the BSS to have a wrong configuration later on in cases where the
separate center frequencies are not set.

Signed-off-by: Baligh Gasmi <gasmibal@gmail.com>
This commit is contained in:
Baligh Gasmi 2024-01-12 10:46:41 +01:00 committed by Jouni Malinen
parent 97403b7fef
commit acea0654f0

View file

@ -3831,7 +3831,7 @@ static int hostapd_change_config_freq(struct hostapd_data *hapd,
struct hostapd_freq_params *old_params)
{
int channel;
u8 seg0, seg1;
u8 seg0 = 0, seg1 = 0;
struct hostapd_hw_modes *mode;
if (!params->channel) {