summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2016-01-26 01:51:34 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2016-01-26 01:51:34 +0000
commit7efb4f56e83faff2532fdd30f99dad56d2783a33 (patch)
tree8790a2bbf2ee402fc8bb57addf3dbfd430e288dd /sys/dev
parent3d07d7ebe703b072989602501769f3c219916307 (diff)
dont leak mbufs on encap failure.
diff from richard proctor on bugs@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_vr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c
index 0cb32d806ac..ea1a6c41b01 100644
--- a/sys/dev/pci/if_vr.c
+++ b/sys/dev/pci/if_vr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vr.c,v 1.148 2015/11/25 03:09:59 dlg Exp $ */
+/* $OpenBSD: if_vr.c,v 1.149 2016/01/26 01:51:33 dlg Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1330,6 +1330,7 @@ vr_start(struct ifnet *ifp)
/* Pack the data into the descriptor. */
head_tx = cur_tx;
if (vr_encap(sc, &cur_tx, m)) {
+ m_freem(m);
ifp->if_oerrors++;
continue;
}