diff options
author | Jouni Malinen <j@w1.fi> | 2016-03-18 14:25:35 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2016-03-18 14:25:35 (GMT) |
commit | 29eddc3d8cf824e058cccade7ffacf0cea109697 (patch) | |
tree | 222573baadff2cb651bb6a3add7b691254a3512b | |
parent | 8c9aa2bc8d57aa04f5d59b0e5b7e764da31fb72c (diff) | |
download | hostap-29eddc3d8cf824e058cccade7ffacf0cea109697.zip hostap-29eddc3d8cf824e058cccade7ffacf0cea109697.tar.gz hostap-29eddc3d8cf824e058cccade7ffacf0cea109697.tar.bz2 |
nl80211: Fix error path in if_indices_reason reallocation
Commit 732b1d20ec06ab92fd22dbdea4609a6528bcf50a ('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>
-rw-r--r-- | src/drivers/driver_nl80211.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index b4c3462..b93721c 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -5712,7 +5712,7 @@ static void add_ifidx(struct wpa_driver_nl80211_data *drv, int ifidx, if (!old_reason) drv->if_indices_reason = drv->default_if_indices_reason; else - drv->if_indices = old_reason; + drv->if_indices_reason = old_reason; } if (!drv->if_indices || !drv->if_indices_reason) { wpa_printf(MSG_ERROR, "Failed to reallocate memory for " |