From 58ea0a652958acdafc571f88cfa27d0e6aa04fa7 Mon Sep 17 00:00:00 2001 From: Sunil Ravi Date: Tue, 4 Feb 2025 18:35:46 +0000 Subject: [PATCH] nl80211: Fix compilation error due to uninitialized variable nl_flags is not necessarily set here. Fixes: 00c2c20d74ee ("hostapd: Maintain single wpa_driver_nl80211_data (drv) object across interfaces") Signed-off-by: Sunil Ravi --- src/drivers/driver_nl80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 665697eb5..85b00af91 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -14672,9 +14672,9 @@ static int wpa_driver_get_wiphy_name_handler(struct nl_msg *msg, void *arg) static int wpa_driver_get_phyname(struct wpa_driver_nl80211_data *drv) { struct nl_msg *msg; - u32 feat, nl_flags; + u32 nl_flags = 0; + u32 feat = get_nl80211_protocol_features(drv); - feat = get_nl80211_protocol_features(drv); if (feat & NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP) nl_flags = NLM_F_DUMP; -- 2.47.2