diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2005-02-26 15:49:35 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2005-02-26 15:49:35 +0000 |
commit | df67fd5e181e11dce58145672edda3d4885a5f0f (patch) | |
tree | dcdf26795c47c02d7a4c8077675734ccf217cd19 | |
parent | 60d6de4242d10f47a209df2303d4335ba27f47b9 (diff) |
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@
-rw-r--r-- | sys/net80211/ieee80211_output.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; } |