]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix compilation error due to uninitialized variable
authorSunil Ravi <sunilravi@google.com>
Tue, 4 Feb 2025 18:35:46 +0000 (18:35 +0000)
committerJouni Malinen <j@w1.fi>
Wed, 5 Feb 2025 20:49:21 +0000 (22:49 +0200)
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 <sunilravi@google.com>
src/drivers/driver_nl80211.c

index 665697eb5a3b113cf5e7ef60b40098c917eeeaef..85b00af91b60c8b2fadf15fa4943790ecbfa9fb9 100644 (file)
@@ -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;