From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shaopeng He Subject: [PATCH 4/5] l3fwd-power: fix a memory leak for non-ip packet Date: Fri, 25 Sep 2015 13:37:04 +0800 Message-ID: <1443159425-32502-5-git-send-email-shaopeng.he@intel.com> References: <1443159425-32502-1-git-send-email-shaopeng.he@intel.com> To: dev@dpdk.org Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A48DC5A89 for ; Fri, 25 Sep 2015 07:37:49 +0200 (CEST) In-Reply-To: <1443159425-32502-1-git-send-email-shaopeng.he@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Previous l3fwd-power only processes IP and IPv6 packet, other packet's mbuf is not released, and causes a memory leak. This patch fixes this issue. Signed-off-by: Shaopeng He --- examples/l3fwd-power/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 8bb88ce..ecdff73 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -714,7 +714,8 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, /* We don't currently handle IPv6 packets in LPM mode. */ rte_pktmbuf_free(m); #endif - } + } else + rte_pktmbuf_free(m); } -- 1.9.3