From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F3B0EA034E; Tue, 22 Feb 2022 19:19:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8742841152; Tue, 22 Feb 2022 19:19:19 +0100 (CET) Received: from out162-62-58-216.mail.qq.com (out162-62-58-216.mail.qq.com [162.62.58.216]) by mails.dpdk.org (Postfix) with ESMTP id 166F741152 for ; Tue, 22 Feb 2022 19:19:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1645553951; bh=kyFF6NZJfFm48rxHt/Bt40m9if/CTMSx6pNAS1iX6PU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=g6ThxPKWTbp9O82ExL2KeqsvqVJUwEOo4w5kujDQgboUim48asGqh1GFk80HR79zF ZYFAzqU/AsrKklH5JFHVegieP/CZwMsh4/Jq7oY2jJqccKtREuuIUpEklm2cEUYJ6Q 5zNiMQvT1CorAlptznHpMNQPWliNKvEVVWcXRCE4= Received: from localhost.localdomain ([111.193.130.237]) by newxmesmtplogicsvrszc6.qq.com (NewEsmtp) with SMTP id 49223207; Wed, 23 Feb 2022 02:18:18 +0800 X-QQ-mid: xmsmtpt1645553947tlz51a11u Message-ID: X-QQ-XMAILINFO: Nb6LX7dsrQEkVIwNM+LXzoRW3xsQuuRL2BPvapxdBqeMSGoWYapwIQEQM2tUs+ V0CHv7meZz2CeXTaUa23FVMfF7NN7DM++9qlpbg4VGBvcrWpxP7NjdIVJ72/JG7ABZTkC6r67wef e1QSD8SWQy/fgfZ050lO9L2KoHZQD6ctbgMno9pa90mNklQxwKcobKEI7A2UilH4Jrnm4egLQeAC 6J4Cc5KD0w1Mg6rEVn4ZRdVShi3afcC2SOGztfX0Ovtv8dKWpPe6M463kDv9NbsHgUhTCxUDc0nt +15c0UpbbLLB+uNZltaqK2/A64VRZRptbsKLsB+db86WIZWgNB6d7/9t/m9RGfZrQ6ZY7TQjSHIf l1ie3VOgAism2UgpDkHIcrllvrO3cOswqQuw61Zfz/tsCKJMC2AnDV1doJFM7miJecByeoNEwjJo kPqvx08Wf0dh3KOQ0YLGpMMofOeoKQwaX/f/ubH2e1toVdnZ7x/tcbBui/KlCLrKI9qFRmM4xgA6 XNVyUcxU08WiPN9WwIw1BRDZwTamnZ/LDbFnO4BJB8jfMjLt4IEnr++avUSxJQAX4ETk2ZfSZGGH f7uWGHOb/TgmQweM0g0Cjj/Yw0mYR7DG7VAMxdgwRkvvvTWFxDhz9K0dVigmX58cye6sk+RnmYSD e4zqOAFXKYt1M26n/fFyoIgcz9fKF9J99vfzpZoa2SeITPx7AfQVJMykSTg6fB6U65oSQP0d5M7x snm5m1gK7ceAOQ37b8gVSb+usaCjsWWn6En65oTrGoxj0Oj4NwROoSjhcroBUFjTZi63NSKwQLbt ut3213AOK93f5oJQPZKdOn0ZgXCEnpx8NLZjUvyGunHpWyPtp/+8WnuWzuABhaqYdo1uoMdzthip LWkeRvks2Jb9+yh1OJYMKv3FNRnmgdwg== From: Weiguo Li To: dev@dpdk.org Cc: adypodoman@gmail.com, xiaoyun.li@intel.com, tianfei.zhang@intel.com, bruce.richardson@intel.com, ivan.malov@oktetlabs.ru, jgrajcia@cisco.com, hkalra@marvell.com, ying.a.wang@intel.com, ting.xu@intel.com, simei.su@intel.com, qiming.yang@intel.com, motih@mellanox.com, shreyansh.jain@nxp.com, skoteshwar@marvell.com, stephen@networkplumber.org, kalesh-anakkur.purayil@broadcom.com, somnath.kotur@broadcom.com, declan.doherty@intel.com, gakhil@marvell.com, nicolas.chautru@intel.com Subject: [PATCH 12/20] net/ice: goto clean up lable to avoid memory leak Date: Wed, 23 Feb 2022 02:18:10 +0800 X-OQ-MSGID: <49cbb5570f58e85951f2f15b397f531dfb495a77.1645551559.git.liwg06@foxmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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