When function return in this branch, the memories of 'input' and 'rule'
are not released, goto corresponding lable to do the clean up.

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

Signed-off-by: Weiguo Li <[email protected]>
---
 drivers/net/ice/ice_acl_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_acl_filter.c b/drivers/net/ice/ice_acl_filter.c
index 8fe6f5aeb0..5ddc5262d4 100644
--- a/drivers/net/ice/ice_acl_filter.c
+++ b/drivers/net/ice/ice_acl_filter.c
@@ -530,7 +530,7 @@ ice_acl_create_filter(struct ice_adapter *ad,
                                   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
                                   "failed to set hw configure.");
                ret = -rte_errno;
-               return ret;
+               goto err_acl_set_input;
        }
 
        if (flow_type == ICE_FLTR_PTYPE_NONF_IPV4_OTHER) {
-- 
2.25.1

Reply via email to