⬢ DragonFlyBSD Kernel Audit
DF-3446 / fix.diff
← back to finding ↓ download raw
--- a/sys/net/ipfw3_basic/ip_fw3_table.c
+++ b/sys/net/ipfw3_basic/ip_fw3_table.c
@@ -185 table_append_dispatch (type 1)
 		if (rnh->rnh_addaddr(&ent->addr, &ent->mask, rnh, ent->rn)
 		    != NULL)
 			table_ctx->count++;
+		else
+			kfree(ent, M_IPFW3_TABLE);	/* DF-3446: dup add */
@@ -208 (type 2 twin)
 		if (rnh->rnh_addaddr(&ent->addr, NULL, rnh, ent->rn) != NULL)
 		       table_ctx->count++;
+	       else
+		       kfree(ent, M_IPFW3_TABLE);