DragonFlyBSD Kernel Audit
DF-0086 / fix.diff
← back to finding ↓ download raw
diff --git a/kern/kern_device.c b/kern/kern_device.c
--- a/kern/kern_device.c
+++ b/kern/kern_device.c
@@ -148,7 +148,7 @@
 	ap.a_devtype = devtype;
 	ap.a_cred = cred;
 	ap.a_fpp = fpp;
-	if (ap.a_fpp)
+	if (ap.a_fpp != NULL && *ap.a_fpp != NULL)
 		(*ap.a_fpp)->f_data = vp;
 
 	/*