[PATCH 12/20] net/ice: goto clean up lable to avoid memory leak
Weiguo Li
liwg06 at foxmail.com
Tue Feb 22 19:18:10 CET 2022
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 <liwg06 at foxmail.com>
---
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
More information about the dev
mailing list