diff options
author | mdodd <mdodd@FreeBSD.org> | 2003-03-21 15:13:29 +0000 |
---|---|---|
committer | mdodd <mdodd@FreeBSD.org> | 2003-03-21 15:13:29 +0000 |
commit | 1cbf7945dedd39a4eb545140a7b43aac13c31fc9 (patch) | |
tree | c854393cf48c693f819e38da1d821ea82e4fb9ec /sys/net/bpf.c | |
parent | 2831e8b3e13d8cce5bf3230f092dc4d8607683ce (diff) | |
download | FreeBSD-src-1cbf7945dedd39a4eb545140a7b43aac13c31fc9.zip FreeBSD-src-1cbf7945dedd39a4eb545140a7b43aac13c31fc9.tar.gz |
Assignment could be NULL, check.
Diffstat (limited to 'sys/net/bpf.c')
-rw-r--r-- | sys/net/bpf.c | 2 |
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); |