projects
/
mech_eap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcd85d9
)
Handle NULL return from os_zalloc() in sta_track_add()
author
Joel Cunningham
<joel.cunningham@me.com>
Fri, 2 Sep 2016 20:38:47 +0000
(15:38 -0500)
committer
Jouni Malinen
<j@w1.fi>
Tue, 6 Sep 2016 15:58:08 +0000
(18:58 +0300)
This adds handling for a memory allocation failure in sta_track_add().
Signed-off-by: Joel Cunningham <joel.cunningham@me.com>
src/ap/beacon.c
patch
|
blob
|
history
diff --git
a/src/ap/beacon.c
b/src/ap/beacon.c
index
202abe6
..
0a006f9
100644
(file)
--- 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);