Skip to content

Commit a4058dc

Browse files
Dan Carpenterjmberg-intel
authored andcommitted
wifi: mac80211: fix memory leak in ieee80211_mgd_assoc_ml_reconf()
Free the "data" allocation before returning on this error path. Fixes: 36e05b0 ("wifi: mac80211: Support dynamic link addition and removal") Signed-off-by: Dan Carpenter <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent 295adaf commit a4058dc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

net/mac80211/mlme.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10273,8 +10273,10 @@ int ieee80211_mgd_assoc_ml_reconf(struct ieee80211_sub_if_data *sdata,
1027310273
* on which the request was received.
1027410274
*/
1027510275
skb = ieee80211_build_ml_reconf_req(sdata, data, rem_links);
10276-
if (!skb)
10277-
return -ENOMEM;
10276+
if (!skb) {
10277+
err = -ENOMEM;
10278+
goto err_free;
10279+
}
1027810280

1027910281
if (rem_links) {
1028010282
u16 new_dormant_links = sdata->vif.dormant_links & ~rem_links;

0 commit comments

Comments
 (0)