diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2009-12-21 22:21:10 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2009-12-21 22:21:10 +0200 |
commit | e62fb0a0defa9b75a61470573633bc73e4691017 (patch) | |
tree | 0cb96eba0af41dd90bcfa7e79159788b8436b676 /src | |
parent | 094393b1447df668015bfed0fa19e9ad29b217fa (diff) | |
download | external_wpa_supplicant_8_ti-e62fb0a0defa9b75a61470573633bc73e4691017.zip external_wpa_supplicant_8_ti-e62fb0a0defa9b75a61470573633bc73e4691017.tar.gz external_wpa_supplicant_8_ti-e62fb0a0defa9b75a61470573633bc73e4691017.tar.bz2 |
nl80211: Use os_* allocation wrappers to avoid WPA_TRACE issues
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/driver_nl80211.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 2359a67..4144e22 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -2056,7 +2056,7 @@ static int phy_info_handler(struct nl_msg *msg, void *arg) return NL_SKIP; nla_for_each_nested(nl_band, tb_msg[NL80211_ATTR_WIPHY_BANDS], rem_band) { - mode = realloc(phy_info->modes, (*phy_info->num_modes + 1) * sizeof(*mode)); + mode = os_realloc(phy_info->modes, (*phy_info->num_modes + 1) * sizeof(*mode)); if (!mode) return NL_SKIP; phy_info->modes = mode; @@ -2102,7 +2102,7 @@ static int phy_info_handler(struct nl_msg *msg, void *arg) mode->num_channels++; } - mode->channels = calloc(mode->num_channels, sizeof(struct hostapd_channel_data)); + mode->channels = os_zalloc(mode->num_channels * sizeof(struct hostapd_channel_data)); if (!mode->channels) return NL_SKIP; @@ -2164,7 +2164,7 @@ static int phy_info_handler(struct nl_msg *msg, void *arg) mode->num_rates++; } - mode->rates = calloc(mode->num_rates, sizeof(int)); + mode->rates = os_zalloc(mode->num_rates * sizeof(int)); if (!mode->rates) return NL_SKIP; |