From d62565d429c9e8d362bca9a6da1fa046d8958c0c Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Thu, 1 Mar 2007 10:55:15 +0000 Subject: 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. --- sys/dev/ic/acx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/dev/ic/acx.c') 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 @@ -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); -- cgit v1.2.3