summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorShaopeng He <shaopeng.he@intel.com>2016-02-05 12:57:50 +0800
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-03-16 18:51:43 +0100
commitbec2f7df9c4509e42c266b164af3ac5998447ffb (patch)
tree46c698bb7d50b54b22119fd8eec7e941226ed018 /examples
parent8bd8bae9c389c1664d095424f5ad1549614cd29c (diff)
downloaddpdk-bec2f7df9c4509e42c266b164af3ac5998447ffb.zip
dpdk-bec2f7df9c4509e42c266b164af3ac5998447ffb.tar.gz
dpdk-bec2f7df9c4509e42c266b164af3ac5998447ffb.tar.xz
examples/l3fwd-power: fix memory leak for non-IP packets
Previous l3fwd-power only processes IP and IPv6 packets, other packets' mbufs are not freed, and this causes a memory leak. This patch fixes this issue. Fixes: 3c0184cc0c60 ("examples: replace some offload flags with packet type") Signed-off-by: Shaopeng He <shaopeng.he@intel.com> Acked-by: Jing Chen <jing.d.chen@intel.com> Acked-by: Michael Qiu <michael.qiu@intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/l3fwd-power/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index d4bb7a3..e7ebe30 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -682,7 +682,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);
}