aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2003-06-06 02:34:41 (GMT)
committerJouni Malinen <j@w1.fi>2003-06-06 02:34:41 (GMT)
commitbdbf560f2e1d75df602e7230e34be073564716f7 (patch)
tree2fdd30c325a85ef4fb50c1872b66e9dc19218c53
parentaaa06b795f4ce702d4789cce2ef227621f65b633 (diff)
downloadhostap-history-bdbf560f2e1d75df602e7230e34be073564716f7.zip
hostap-history-bdbf560f2e1d75df602e7230e34be073564716f7.tar.gz
hostap-history-bdbf560f2e1d75df602e7230e34be073564716f7.tar.bz2
Verify that eapol_sm_alloc() succeeded before derefering the returned
pointer.
-rw-r--r--hostapd/ieee802_1x.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hostapd/ieee802_1x.c b/hostapd/ieee802_1x.c
index 1bbd643..134158f 100644
--- a/hostapd/ieee802_1x.c
+++ b/hostapd/ieee802_1x.c
@@ -795,7 +795,8 @@ void ieee802_1x_new_station(hostapd *hapd, struct sta_info *sta)
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X,
HOSTAPD_LEVEL_DEBUG, "start authentication");
sta->eapol_sm = eapol_sm_alloc(hapd, sta);
- sta->eapol_sm->portEnabled = TRUE;
+ if (sta->eapol_sm)
+ sta->eapol_sm->portEnabled = TRUE;
}