From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 58BF61B1BD for ; Wed, 24 Jan 2018 16:41:38 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id E71692237D; Wed, 24 Jan 2018 10:41:37 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:41:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=jX8O6XaWqVf3UL2KS +kGSjasmsET4q8rqk77vzC1qVE=; b=qGxT/od6dtfAYwmeWT8/cKJGmaW6xYMLB CxBCxfMFE5IWM5M6a2eGWpHoEt3Fig0fQX5MejzCnrf8dV4ZHtZomVj0Y3EkUu8g 1u3ShvqD744o2qKU8ydAWR66XOtDCvUFUBJxa0YIz+1OsdykwpHywz1YAaK5rp1Z 56CMe5T2o8ecc1xelxZzokEHf47CFXNX3y4mnWEYD7WcJ+Iv6BzXwOcIYO+f6FqD heY9t80vc3txnz1W6UKnSQ/pOrVUWVDJN3+lF/82PMzP3zJOGcmP9ZR88x61Aora EQt5SfKj8LeKPNBHV/CFv5X1sn+MPolz4bX3sQF0RL01s7eyVL+cA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=jX8O6XaWqVf3UL2KS+kGSjasmsET4q8rqk77vzC1qVE=; b=YLFrpf0X LqexOankROp3AoJgVS8IPZoPIfgvyRIdnZ7KQXel10n9XsuJZGnwvEwNRvvEnCmn aXcAh4Twbno32cD+dv//Kngrs6zFVr7D0hgMffGwnbs74q8snLTzsjlNnEh0pbC2 3JErCUeeBtbJsnP3jExIq+itjX953Mo3sTw6YIWguGs95JoQd9B53MJc0ycE4cAJ dKA/HxBxAMdeeiP91J6MilYzBC3yY9r6HLKEUdCk+BaV2S09hywplGcP8Apw/45r 0MbQ60ixd3JBXwscFTy3LqRi87NpUxwqBDYWb3MDYlojz/U/uBSG2N2x0Zbos/Zl WP29lPjLTCCVVQ== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id BAAE27E1A2; Wed, 24 Jan 2018 10:41:35 -0500 (EST) From: Yuanhan Liu To: Anatoly Burakov Cc: Yipeng Wang , dpdk stable Date: Wed, 24 Jan 2018 23:33:16 +0800 Message-Id: <1516808026-25523-128-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'member: fix memory leak on error' has been queued to LTS release 17.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2018 15:41:38 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 01/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From d346286df3b5ca979ed1a4a8dfd0a294492f4ae7 Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Fri, 12 Jan 2018 17:23:16 +0000 Subject: [PATCH] member: fix memory leak on error [ upstream commit 5988076ac3393a0ca46e8dca0baa4d0c4f672b44 ] rte_member may have allocated a tailq entry or setum before failure, so free them. Fixes: 857ed6c68cf2 ("member: implement main API") Signed-off-by: Anatoly Burakov Acked-by: Yipeng Wang --- lib/librte_member/rte_member.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_member/rte_member.c b/lib/librte_member/rte_member.c index cc9ea84..c3a238b 100644 --- a/lib/librte_member/rte_member.c +++ b/lib/librte_member/rte_member.c @@ -191,8 +191,9 @@ rte_member_create(const struct rte_member_parameters *params) return setsum; error_unlock_exit: + rte_free(te); + rte_free(setsum); rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK); - rte_member_free(setsum); return NULL; } -- 2.7.4