aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/bss.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-01-09 21:56:09 (GMT)
committerJouni Malinen <j@w1.fi>2010-01-09 21:56:09 (GMT)
commit728e776c09d1a9103226da1a4603c3ab34b8bb5f (patch)
tree2fd33caf8319c4f55d6fbd311abc975f46046f93 /wpa_supplicant/bss.c
parent9a8d8b3db5023847ce2ab7c8a40d4c28c4e8b21d (diff)
downloadhostap-728e776c09d1a9103226da1a4603c3ab34b8bb5f.zip
hostap-728e776c09d1a9103226da1a4603c3ab34b8bb5f.tar.gz
hostap-728e776c09d1a9103226da1a4603c3ab34b8bb5f.tar.bz2
Fix alloc validation in wpa_bss_get_bit_rates()
Need to check the value returned by os_malloc(), not the pointer to this value.
Diffstat (limited to 'wpa_supplicant/bss.c')
-rw-r--r--wpa_supplicant/bss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
index e2846b7..599879d 100644
--- a/wpa_supplicant/bss.c
+++ b/wpa_supplicant/bss.c
@@ -578,7 +578,7 @@ int wpa_bss_get_bit_rates(const struct wpa_bss *bss, u8 **rates)
len = (ie ? ie[1] : 0) + (ie2 ? ie2[1] : 0);
*rates = os_malloc(len);
- if (!rates)
+ if (!*rates)
return -1;
for (i = 0; ie && i < ie[1]; i++)