aboutsummaryrefslogtreecommitdiffstats
path: root/examples/bond/main.c
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2018-04-23 14:20:17 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2018-04-24 08:23:10 +0100
commit5076209fa6f4affdf93f4d2f23f51a427f64f72b (patch)
tree2dd6d71d781670133d79938ba6a3c27163e82306 /examples/bond/main.c
parent68f5e9d7d40c36c6ea398953af7e56519928ea78 (diff)
parent18af4227fa5eee002b1a79207935620f6112803e (diff)
Merge branch 'upstream-16.11-stable' into 16.11.x
Change-Id: Ie0b10377bb151ddac6307982be5b15624206e6a6 Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'examples/bond/main.c')
-rw-r--r--examples/bond/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 9a4ec807..f1303e3c 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -437,6 +437,11 @@ static void cmd_obj_send_parsed(void *parsed_result,
(BOND_IP_3 << 16) | (BOND_IP_4 << 24);
created_pkt = rte_pktmbuf_alloc(mbuf_pool);
+ if (created_pkt == NULL) {
+ cmdline_printf(cl, "Failed to allocate mbuf\n");
+ return;
+ }
+
pkt_size = sizeof(struct ether_hdr) + sizeof(struct arp_hdr);
created_pkt->data_len = pkt_size;
created_pkt->pkt_len = pkt_size;