summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>2003-03-21 15:13:29 +0000
committermdodd <mdodd@FreeBSD.org>2003-03-21 15:13:29 +0000
commit1cbf7945dedd39a4eb545140a7b43aac13c31fc9 (patch)
treec854393cf48c693f819e38da1d821ea82e4fb9ec /sys/net
parent2831e8b3e13d8cce5bf3230f092dc4d8607683ce (diff)
downloadFreeBSD-src-1cbf7945dedd39a4eb545140a7b43aac13c31fc9.zip
FreeBSD-src-1cbf7945dedd39a4eb545140a7b43aac13c31fc9.tar.gz
Assignment could be NULL, check.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index a27cd3b..0b6f5e8 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1360,7 +1360,7 @@ bpfdetach(ifp)
}
/* Interface wasn't attached */
- if (bp->bif_ifp == NULL) {
+ if ((bp == NULL) || (bp->bif_ifp == NULL)) {
mtx_unlock(&bpf_mtx);
printf("bpfdetach: %s%d was not attached\n", ifp->if_name,
ifp->if_unit);
OpenPOWER on IntegriCloud