mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-06 12:14:04 -05:00
nl80211: Fix error path in if_indices_reason reallocation
Commit 732b1d20ec
('nl80211: Clean up
ifidx properly if interface in a bridge is removed') added
drv->if_indices_reason array similarly to the previously used
drv->if_indices. However, it had a copy-paste error here on the error
path where a reallocation failure after at least one successful
reallocation would result in the drv->if_indices being overridden
instead of restoring drv->if_indices_reason to the old value. Fix this
by setting the correct variable on the error path. (CID 138514)
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
8c9aa2bc8d
commit
29eddc3d8c
@ -5712,7 +5712,7 @@ static void add_ifidx(struct wpa_driver_nl80211_data *drv, int ifidx,
|
|||||||
if (!old_reason)
|
if (!old_reason)
|
||||||
drv->if_indices_reason = drv->default_if_indices_reason;
|
drv->if_indices_reason = drv->default_if_indices_reason;
|
||||||
else
|
else
|
||||||
drv->if_indices = old_reason;
|
drv->if_indices_reason = old_reason;
|
||||||
}
|
}
|
||||||
if (!drv->if_indices || !drv->if_indices_reason) {
|
if (!drv->if_indices || !drv->if_indices_reason) {
|
||||||
wpa_printf(MSG_ERROR, "Failed to reallocate memory for "
|
wpa_printf(MSG_ERROR, "Failed to reallocate memory for "
|
||||||
|
Loading…
Reference in New Issue
Block a user