diff options
author | 2005-02-26 15:49:34 +0000 | |
---|---|---|
committer | 2005-02-26 15:49:34 +0000 | |
commit | 901bffb82da01e263b765139e7037a1397adbc28 (patch) | |
tree | db8eb95986e8a364e8dffef5e9d360711bd5a72c | |
parent | ypu sure get the impression the number of memory leaks in error pathes (diff) | |
download | wireguard-openbsd-901bffb82da01e263b765139e7037a1397adbc28.tar.xz wireguard-openbsd-901bffb82da01e263b765139e7037a1397adbc28.zip |
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; } |