Thread (65 messages) 65 messages, 7 authors, 2016-03-03

Re: [PATCH 4/5] l3fwd-power: fix a memory leak for non-ip packet

From: De Lara Guarch, Pablo <hidden>
Date: 2015-09-25 07:19:33

Hi Shaopeng,
-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shaopeng He
Sent: Friday, September 25, 2015 6:37 AM
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 4/5] l3fwd-power: fix a memory leak for non-ip
packet

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.
Is this patch related to the rest of the patchset? Something where fm10k is involved?
Because it does not look like.

Thanks,
Pablo
quoted hunk ↗ jump to hunk
Signed-off-by: Shaopeng He <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help