DragonFlyBSD Kernel Audit
DF-1132 / fix.diff
← back to finding ↓ download raw
--- /tmp/orig/dev/netif/bwn/bwn/if_bwn.c	2026-07-23 11:54:56.794821000 +0000
+++ dev/netif/bwn/bwn/if_bwn.c	2026-07-23 12:07:22.042310000 +0000
@@ -7082,6 +7082,8 @@
 		dr = NULL;
 		KASSERT(0 == 1,
 		    ("invalid cookie value %d", cookie & 0xf000));
+		if (dr == NULL)
+			return (NULL);
 	}
 	*slot = (cookie & 0x0fff);
 	if (*slot < 0 || *slot >= dr->dr_numslots) {