summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@openbsd.org>2010-10-30 11:47:53 +0000
committerdamien <damien@openbsd.org>2010-10-30 11:47:53 +0000
commit274251a040ebcafc232bafe0cbb7b8c800310629 (patch)
treea9751deddb0f03f35c1a67c2f9f561e3edcd65e4
parentuse (ifp->if_softc != NULL) instead of (ifp->if_flags != 0) to check (diff)
downloadwireguard-openbsd-274251a040ebcafc232bafe0cbb7b8c800310629.tar.xz
wireguard-openbsd-274251a040ebcafc232bafe0cbb7b8c800310629.zip
don't release the node twice if tx() fails
-rw-r--r--sys/dev/usb/if_otus.c3
-rw-r--r--sys/dev/usb/if_run.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/usb/if_otus.c b/sys/dev/usb/if_otus.c
index ad76cb23ad5..a1e1d82950b 100644
--- a/sys/dev/usb/if_otus.c
+++ b/sys/dev/usb/if_otus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_otus.c,v 1.21 2010/10/30 11:46:47 damien Exp $ */
+/* $OpenBSD: if_otus.c,v 1.22 2010/10/30 11:47:53 damien Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -1439,7 +1439,6 @@ sendit:
bpf_mtap(ic->ic_rawbpf, m, BPF_DIRECTION_OUT);
#endif
if (otus_tx(sc, m, ni) != 0) {
- ieee80211_release_node(ic, ni);
ifp->if_oerrors++;
continue;
}
diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c
index 454fce8e919..5f650bd6bf6 100644
--- a/sys/dev/usb/if_run.c
+++ b/sys/dev/usb/if_run.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_run.c,v 1.76 2010/10/30 11:46:47 damien Exp $ */
+/* $OpenBSD: if_run.c,v 1.77 2010/10/30 11:47:53 damien Exp $ */
/*-
* Copyright (c) 2008-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -2250,7 +2250,6 @@ sendit:
bpf_mtap(ic->ic_rawbpf, m, BPF_DIRECTION_OUT);
#endif
if (run_tx(sc, m, ni) != 0) {
- ieee80211_release_node(ic, ni);
ifp->if_oerrors++;
continue;
}