DragonFlyBSD Kernel Audit
DF-0697 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/netgraph7/etf/ng_etf.c b/sys/netgraph7/etf/ng_etf.c
--- a/sys/netgraph7/etf/ng_etf.c
+++ b/sys/netgraph7/etf/ng_etf.c
@@ -318,7 +318,8 @@
 				 * Ok, make the filter and put it in the 
 				 * hashtable ready for matching.
 				 */
-				fil = kmalloc(sizeof(*fil), M_NETGRAPH_ETF,
+				/* on failure goto the epilogue so the lock is released */
+			fil = kmalloc(sizeof(*fil), M_NETGRAPH_ETF,
 					      M_WAITOK | M_NULLOK | M_ZERO);
 				if (fil == NULL) {
 					error = ENOMEM;