From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 2A47F4C9C for ; Mon, 5 Nov 2018 17:21:55 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Nov 2018 08:21:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,468,1534834800"; d="scan'208";a="86821248" Received: from silpixa00381635.ir.intel.com (HELO silpixa00381635.ger.corp.intel.com) ([10.237.222.149]) by orsmga007.jf.intel.com with ESMTP; 05 Nov 2018 08:21:53 -0800 From: Jasvinder Singh To: dev@dpdk.org Cc: ferruh.yigit@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com Date: Mon, 5 Nov 2018 16:21:52 +0000 Message-Id: <20181105162152.31301-1-jasvinder.singh@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] app/testpmd: fix memory leak for tm object 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: Mon, 05 Nov 2018 16:21:56 -0000 Fixes memory leak for shared shaper object of the traffic manager. Fixes: 5b590fbe09b6 ("app/testpmd: add traffic management forwarding mode") Signed-off-by: Jasvinder Singh --- app/test-pmd/softnicfwd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-pmd/softnicfwd.c b/app/test-pmd/softnicfwd.c index 7ff622806..94e6669d3 100644 --- a/app/test-pmd/softnicfwd.c +++ b/app/test-pmd/softnicfwd.c @@ -458,6 +458,7 @@ softport_tm_tc_node_add(portid_t port_id, error->message, shaper_profile_id); + free(tnp.shared_shaper_id); return -1; } tnp.shaper_profile_id = shaper_profile_id; @@ -473,6 +474,7 @@ softport_tm_tc_node_add(portid_t port_id, error->message, h->tc_node_id[pos][k]); + free(tnp.shared_shaper_id); return -1; } shaper_profile_id++; -- 2.17.1