From 901bffb82da01e263b765139e7037a1397adbc28 Mon Sep 17 00:00:00 2001 From: jsg Date: Sat, 26 Feb 2005 15:49:34 +0000 Subject: Fix a problem introduced with the recent lru cache change. Check that we actually have a node before trying to release it. This was causing a panic when playing with IBSS. ok reyk@ --- sys/net80211/ieee80211_output.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/net80211/ieee80211_output.c') diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index d8ccc745ec1..1ef0ebfa51a 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_output.c,v 1.5 2005/02/17 18:28:05 reyk Exp $ */ +/* $OpenBSD: ieee80211_output.c,v 1.6 2005/02/26 15:49:34 jsg Exp $ */ /* $NetBSD: ieee80211_output.c,v 1.13 2004/05/31 11:02:55 dyoung Exp $ */ /*- @@ -253,7 +253,8 @@ ieee80211_encap(struct ifnet *ifp, struct mbuf *m, struct ieee80211_node **pni) bad: if (m != NULL) m_freem(m); - ieee80211_release_node(ic, ni); + if (ni != NULL) + ieee80211_release_node(ic, ni); *pni = NULL; return NULL; } -- cgit v1.2.3-59-g8ed1b