diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-03-01 10:55:15 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-03-01 10:55:15 +0000 |
commit | d62565d429c9e8d362bca9a6da1fa046d8958c0c (patch) | |
tree | 24078a085baacaf7dee3f9a55b9f76dd6187a256 | |
parent | a23e6dd0ed3c46994e1c14a4df836cb204936285 (diff) |
In acx_set_probe_resp_tmplt () ieee80211_beacon_alloc() could fail so check the
return value. Stolen from acx_set_beacon_tmplt() that already does this check.
-rw-r--r-- | sys/dev/ic/acx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c index 5164f046cd5..5911ded5a6f 100644 --- a/sys/dev/ic/acx.c +++ b/sys/dev/ic/acx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acx.c,v 1.65 2007/02/28 09:26:26 claudio Exp $ */ +/* $OpenBSD: acx.c,v 1.66 2007/03/01 10:55:14 claudio Exp $ */ /* * Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org> @@ -2333,6 +2333,8 @@ acx_set_probe_resp_tmplt(struct acx_softc *sc, struct ieee80211_node *ni) bzero(&resp, sizeof(resp)); m = ieee80211_beacon_alloc(ic, ni); + if (m == NULL) + return (1); m_copydata(m, 0, m->m_pkthdr.len, (caddr_t)&resp.data); len = m->m_pkthdr.len + sizeof(resp.size); m_freem(m); |