Merge branch 'upstream-16.11-stable' into 16.11.x
[deb_dpdk.git] / examples / bond / main.c
index 9a4ec80..f1303e3 100644 (file)
@@ -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;