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:
Jouni Malinen 2011-12-04 13:12:30 +02:00
parent 210ff0f7f3
commit 78018ae91d

View file

@ -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;