Assignment could be NULL, check.

This commit is contained in:
mdodd 2003-03-21 15:13:29 +00:00
parent 22af89167b
commit 8d9ce6838f

View File

@ -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);