wifi: mac80211: fix use-after-free
[platform/kernel/linux-starfive.git] / net / mac80211 / mlme.c
index 3d4ab71..04d35cd 100644 (file)
@@ -5124,7 +5124,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
        resp.req_ies = ifmgd->assoc_req_ies;
        resp.req_ies_len = ifmgd->assoc_req_ies_len;
        if (sdata->vif.valid_links)
-               resp.ap_mld_addr = assoc_data->ap_addr;
+               resp.ap_mld_addr = sdata->vif.cfg.ap_addr;
        cfg80211_rx_assoc_resp(sdata->dev, &resp);
 notify_driver:
        drv_mgd_complete_tx(sdata->local, sdata, &info);