⬢ DragonFlyBSD Kernel Audit
DF-3472 / fix.diff
← back to finding ↓ download raw
--- a/sys/net/rtsock.c	2026-06-29 12:51:19.000000000 +0000
+++ b/sys/net/rtsock.c	2026-10-26 03:32:28.598643362 +0000
@@ -274,7 +274,9 @@
 	error = raw_attach(so, proto, ai->sb_rlimit);
 	rp = sotorawcb(so);
 	if (error) {
+		so->so_pcb = NULL;
 		kfree(rop, M_PCB);
+		sofree(so);	/* release the pcb reference */
 		goto done;
 	}
 	switch(rp->rcb_proto.sp_protocol) {