From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id E281F1B2D3 for ; Thu, 21 Dec 2017 18:50:48 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Dec 2017 09:50:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,436,1508828400"; d="scan'208";a="4228739" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga007.fm.intel.com with ESMTP; 21 Dec 2017 09:50:46 -0800 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id vBLHojb3002580; Thu, 21 Dec 2017 17:50:45 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id vBLHojUv019489; Thu, 21 Dec 2017 17:50:45 GMT Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id vBLHojLL019483; Thu, 21 Dec 2017 17:50:45 GMT From: Anatoly Burakov To: dev@dpdk.org Cc: Yipeng Wang , Sameh Gobriel Date: Thu, 21 Dec 2017 17:50:45 +0000 Message-Id: <5c0a540f8917604a86e18f8da77fa0c2013b7fde.1513865858.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] member: fix memory leak on error 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: , X-List-Received-Date: Thu, 21 Dec 2017 17:50:49 -0000 rte_member may have allocated a tailq entry before failure, so free it. Fixes: 857ed6c68cf2 ("member: implement main API") Cc: yipeng1.wang@intel.com Signed-off-by: Anatoly Burakov --- lib/librte_member/rte_member.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_member/rte_member.c b/lib/librte_member/rte_member.c index cc9ea84..569fff9 100644 --- a/lib/librte_member/rte_member.c +++ b/lib/librte_member/rte_member.c @@ -191,6 +191,7 @@ rte_member_create(const struct rte_member_parameters *params) return setsum; error_unlock_exit: + rte_free(te); rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK); rte_member_free(setsum); return NULL; -- 2.7.4