Fix basic_rates copying
Commit e5693c4775
used incorrect
sizeof to copy the basic rates.
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
210ff0f7f3
commit
78018ae91d
1 changed files with 2 additions and 2 deletions
|
@ -130,9 +130,9 @@ int hostapd_prepare_rates(struct hostapd_iface *iface,
|
|||
while (basic_rates[i] >= 0)
|
||||
i++;
|
||||
os_free(iface->basic_rates);
|
||||
iface->basic_rates = os_malloc(i * sizeof(int *));
|
||||
iface->basic_rates = os_malloc(i * sizeof(int));
|
||||
if (iface->basic_rates)
|
||||
os_memcpy(iface->basic_rates, basic_rates, i * sizeof(int *));
|
||||
os_memcpy(iface->basic_rates, basic_rates, i * sizeof(int));
|
||||
|
||||
os_free(iface->current_rates);
|
||||
iface->num_rates = 0;
|
||||
|
|
Loading…
Reference in a new issue