[PATCH 7/7] net/ice: fix ACL profile segment leak

Anurag Mandal anurag.mandal at intel.com
Tue Oct 27 11:51:37 CET 2026


ice_acl_prof_init() allocates a flow segment to add the ACL profiles,
but only frees it on the error path. ice_flow_add_prof() copies the
segments, so the buffer is no longer needed once the profiles are
added, and it leaks on every ACL engine init.

Free it on success as well.

Fixes: 40d466fa9f76 ("net/ice: support ACL filter in DCF")

Signed-off-by: Anurag Mandal <anurag.mandal at intel.com>
---
 drivers/net/intel/ice/ice_acl_filter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/intel/ice/ice_acl_filter.c b/drivers/net/intel/ice/ice_acl_filter.c
index 21b48e1009..d49e514d69 100644
--- a/drivers/net/intel/ice/ice_acl_filter.c
+++ b/drivers/net/intel/ice/ice_acl_filter.c
@@ -308,6 +308,7 @@ ice_acl_prof_init(struct ice_pf *pf)
 				goto err_assoc_prof;
 		}
 	}
+	ice_free(hw, seg);
 	return 0;
 
 err_assoc_prof:
-- 
2.25.1



More information about the dev mailing list