From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 28AD8A04DC; Tue, 20 Oct 2020 16:10:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 81D8DACE4; Tue, 20 Oct 2020 16:10:41 +0200 (CEST) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by dpdk.org (Postfix) with ESMTP id 78DEFACD4; Tue, 20 Oct 2020 16:10:39 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 36E1AE18; Tue, 20 Oct 2020 10:10:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 20 Oct 2020 10:10:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= Lfp/gHH4VZwPv0khXpV7OwxutRRc4FIDy7uaghigAjI=; b=jx1vzJnrasi1Twaj lAW7zmbv5Ace8FTKZuxKHN1KdeWmIB5qDG3AxEtW2wuSMx7stI14Ymi59xMbQsaW BdXDmoN6KBJ/iYW8SndOm7dsYwyp4Vw2XlYuzbGBxzrTDU+e+szBP7oNUqLmPt0A 5JkNhsIF5PK0KNXTpJ3kGrQjqLIe5uaSyr7F1HUsWnY3e+OPuPvPp6zeAKHniIwY LXf92Nk0C51PGmJH8lchD6Pz/HSsxqZzvEvDv/gc/3mybNgZ08nIfvu8Rao2hg30 RK90W7V1mJAF5LABxpgKNr5cDcitAbhPmH27hRvFz6LN33uvO2IZjkSUr53sRrkV Wlu+kg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=Lfp/gHH4VZwPv0khXpV7OwxutRRc4FIDy7uaghigA jI=; b=k/gCkP2fkZtNKABUiYySKB/O8NwgVMQhqCHCFIjBFI1pQw+8qrDLVM8k/ rheYxUfdhuYHigEkSQoRWnw98UDQmwJe8hgFy89CzAgQeRyivbW0z8W5iWX9Cb+W buXN25Z3OQJ51mGNwA2r0VsMjhje9QqYnK9Z8ri7QvxblyaC0K0bCMSexzaPgRJF 52XxL59oIQrdy0UbIPH9WNY5nPOTP2gEfvFjdTS0YdsYWMkdrSKHCGUzUwJG6TLz Z/w4iTQWSPr/gdL8sEx5Xx/SBOV2nQph9J55ubtbBbOJITHVkxO4WuXHvlej2EZ0 wos156DodE6xNbae7a1GmzkRrFodA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrjeefgdejudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgepudenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 6B176328005A; Tue, 20 Oct 2020 10:10:35 -0400 (EDT) From: Thomas Monjalon To: byron.marohn@intel.com, yipeng1.wang@intel.com Cc: dev@dpdk.org, jerry.lilijun@huawei.com, xudingke@huawei.com, Yunjian Wang , stable@dpdk.org, wangyunjian Date: Tue, 20 Oct 2020 16:10:33 +0200 Message-ID: <2570421.hXoGziszdc@thomas> In-Reply-To: <49d4bdc58b81564788cfd31f16ef2e66c1673f6d.1601347917.git.wangyunjian@huawei.com> References: <49d4bdc58b81564788cfd31f16ef2e66c1673f6d.1601347917.git.wangyunjian@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] efd: fix tailq entry leak in error path X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Byron, Yipeng, Please could you review? Thanks 29/09/2020 05:31, wangyunjian: > From: Yunjian Wang > > In rte_efd_create() allocated memory for tailq entry, we should > free it when error happens, otherwise it will lead to memory leak. > > Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library") > Cc: stable@dpdk.org > > Signed-off-by: Yunjian Wang > --- > lib/librte_efd/rte_efd.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c > index 6a799556d..0aa120f48 100644 > --- a/lib/librte_efd/rte_efd.c > +++ b/lib/librte_efd/rte_efd.c > @@ -707,6 +707,7 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len, > > error_unlock_exit: > rte_mcfg_tailq_write_unlock(); > + rte_free(te); > rte_efd_free(table); > > return NULL; >