From 1cbf7945dedd39a4eb545140a7b43aac13c31fc9 Mon Sep 17 00:00:00 2001 From: mdodd Date: Fri, 21 Mar 2003 15:13:29 +0000 Subject: Assignment could be NULL, check. --- sys/net/bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/net') 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); -- cgit v1.1