summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcsapuntz <csapuntz@openbsd.org>2001-03-25 02:44:42 +0000
committercsapuntz <csapuntz@openbsd.org>2001-03-25 02:44:42 +0000
commitfbdd9940a15248406e8412aa9c75d6f994d8f3c9 (patch)
tree3226b133885a98d854b978e0cc2f4b13b6af0c5a
parentIf we're adding an interface address that is already one of the interface's (diff)
downloadwireguard-openbsd-fbdd9940a15248406e8412aa9c75d6f994d8f3c9.tar.xz
wireguard-openbsd-fbdd9940a15248406e8412aa9c75d6f994d8f3c9.zip
Don't set pbp to point to free memory. Thanks to Dawson Engler and team
-rw-r--r--sys/net/bpf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index e13c4202bd7..e93575c22f3 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.23 2001/03/13 05:09:51 mickey Exp $ */
+/* $OpenBSD: bpf.c,v 1.24 2001/03/25 02:44:42 csapuntz Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
@@ -1251,8 +1251,8 @@ bpfdetach(ifp)
}
free(bp, M_DEVBUF);
- }
- pbp = &bp->bif_next;
+ } else
+ pbp = &bp->bif_next;
}
ifp->if_bpf = NULL;
}