summaryrefslogtreecommitdiffstats
path: root/drivers/net/pcap/rte_eth_pcap.c
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-12-05 11:42:44 +0100
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-12-05 11:46:26 +0100
commit32e04ea00cd159613e04acef75e52bfca6eeff2f (patch)
treef19e4885612e596bb8c8c3c5914157ae5417e180 /drivers/net/pcap/rte_eth_pcap.c
parent6cfa4f771efe39dbc944e799cbe465134c8931fa (diff)
Imported Upstream version 16.07.2
Change-Id: I76bc313e0942233ce259612069ded302dd6c87bb Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'drivers/net/pcap/rte_eth_pcap.c')
-rw-r--r--drivers/net/pcap/rte_eth_pcap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 7e213ebb..7b7126bf 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -229,8 +229,10 @@ eth_pcap_rx(void *queue,
if (unlikely(eth_pcap_rx_jumbo(pcap_q->mb_pool,
mbuf,
packet,
- header.caplen) == -1))
+ header.caplen) == -1)) {
+ rte_pktmbuf_free(mbuf);
break;
+ }
}
mbuf->pkt_len = (uint16_t)header.caplen;