diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2006-07-02 06:52:37 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2006-07-02 06:52:37 +0000 |
commit | b4f793366b12b2d150cc5f27c4b5cf82fbf933b7 (patch) | |
tree | f33424f7ac1d8e4609ce818732813e017b95ff24 /sys/dev/usb/if_zyd.c | |
parent | 93ed05bbe0fa001c5f93f1651fee932fb7c7201c (diff) |
If ieee80211_encap() returns NULL the node is already free,
do not try to free it again.
Modified version of a diff from Graham Gower.
Diffstat (limited to 'sys/dev/usb/if_zyd.c')
-rw-r--r-- | sys/dev/usb/if_zyd.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c index 7f736cbda79..6fb0b3c6af7 100644 --- a/sys/dev/usb/if_zyd.c +++ b/sys/dev/usb/if_zyd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_zyd.c,v 1.18 2006/07/02 02:59:21 jsg Exp $ */ +/* $OpenBSD: if_zyd.c,v 1.19 2006/07/02 06:52:36 jsg Exp $ */ /* * Copyright (c) 2006 by Florian Stoehr <ich@florian-stoehr.de> @@ -3583,10 +3583,8 @@ zyd_start(struct ifnet *ifp) bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT); #endif - m0 = ieee80211_encap(ifp, m0, &ni); - - if (m0 == NULL) { - ieee80211_release_node(ic, ni); + if ((m0 = ieee80211_encap(ifp, m0, &ni)) == NULL) { + ifp->if_oerrors++; continue; } |