diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-01-17 20:07:40 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-01-17 20:07:40 +0000 |
commit | 94245b8962fb2f79e3ee6ee8b7d9f40e2408924e (patch) | |
tree | 0a320ee472f0efd5db92b56065b7af5c171b30e0 /sys/dev | |
parent | d0f06082dce67d57e9c6b567cb1ea6cb37bcb4b4 (diff) |
Add missing malloc(9) return value check in athn_node_alloc().
ok millert@ tom@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/athn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c index 83b3837b655..2b67ad2d1b1 100644 --- a/sys/dev/ic/athn.c +++ b/sys/dev/ic/athn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: athn.c,v 1.95 2017/01/12 18:06:57 stsp Exp $ */ +/* $OpenBSD: athn.c,v 1.96 2017/01/17 20:07:39 stsp Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -2337,7 +2337,7 @@ athn_node_alloc(struct ieee80211com *ic) struct athn_node *an; an = malloc(sizeof(struct athn_node), M_DEVBUF, M_NOWAIT | M_ZERO); - if (ic->ic_flags & IEEE80211_F_HTON) + if (an && (ic->ic_flags & IEEE80211_F_HTON)) ieee80211_mira_node_init(&an->mn); return (struct ieee80211_node *)an; } |