DragonFlyBSD Kernel Audit
DF-0727 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/netgraph7/tee/ng_tee.c b/sys/netgraph7/tee/ng_tee.c
--- a/sys/netgraph7/tee/ng_tee.c
+++ b/sys/netgraph7/tee/ng_tee.c
@@ -260,7 +260,7 @@
 		}
 		break;
 	case NGM_FLOW_COOKIE:
-		if (lasthook == sc->left.hook || lasthook == sc->right.hook)  {
+		if (lasthook != NULL && (lasthook == sc->left.hook || lasthook == sc->right.hook)) {
 			hi_p const hinfo = NG_HOOK_PRIVATE(lasthook);
 			if (hinfo && hinfo->dest) {
 				NGI_MSG(item) = msg;