aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Cunningham <joel.cunningham@me.com>2016-09-02 20:38:47 (GMT)
committerJouni Malinen <j@w1.fi>2016-09-06 15:58:08 (GMT)
commit711e3cab0756623335af83599253971c468f0545 (patch)
tree9101f2b01e8cca36b3cbc5dac74a1eb1ac0b3804
parentfcd85d9a3f2d9d63d0fa57e93446ad467db75b23 (diff)
downloadhostap-711e3cab0756623335af83599253971c468f0545.zip
hostap-711e3cab0756623335af83599253971c468f0545.tar.gz
hostap-711e3cab0756623335af83599253971c468f0545.tar.bz2
Handle NULL return from os_zalloc() in sta_track_add()
This adds handling for a memory allocation failure in sta_track_add(). Signed-off-by: Joel Cunningham <joel.cunningham@me.com>
-rw-r--r--src/ap/beacon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index 202abe6..0a006f9 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -632,6 +632,8 @@ void sta_track_add(struct hostapd_iface *iface, const u8 *addr)
/* Add a new entry */
info = os_zalloc(sizeof(*info));
+ if (info == NULL)
+ return;
os_memcpy(info->addr, addr, ETH_ALEN);
os_get_reltime(&info->last_seen);