]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Avoid uninitialized err_info on test failure path
authorMeng Yuan <quic_menyua@quicinc.com>
Wed, 8 Jan 2025 08:10:10 +0000 (16:10 +0800)
committerJouni Malinen <j@w1.fi>
Tue, 11 Feb 2025 20:59:58 +0000 (22:59 +0200)
Initialize err_info.link_id before use to cover the TEST_FAIL testing
case for a failure where err_info.link_id might not be set.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/drivers/driver_nl80211.c

index c7272756400403411ccda35ba501a47156c3f06b..966bbe39f48ddaec7023372dfa0f372bc856f119 100644 (file)
@@ -7483,7 +7483,7 @@ static int wpa_driver_nl80211_associate(
 {
        struct i802_bss *bss = priv;
        struct wpa_driver_nl80211_data *drv = bss->drv;
-       struct nl80211_err_info err_info;
+       struct nl80211_err_info err_info = { -1 };
        int ret = -1;
        struct nl_msg *msg;