]> git.droids-corp.org - dpdk.git/blobdiff - app/test/test_table_acl.c
app/test: check for mbuf allocation failure
[dpdk.git] / app / test / test_table_acl.c
index 0f2b57e0b2fe9fe43fef4b3cfdcc7424f5e7d985..e4e9b9cbba242272359616aaeb863b1276095080 100644 (file)
@@ -513,6 +513,11 @@ test_pipeline_single_filter(int expected_count)
                        struct rte_mbuf *mbuf;
 
                        mbuf = rte_pktmbuf_alloc(pool);
+                       if (mbuf == NULL)
+                               /* this will cause test failure after cleanup
+                                * of already enqueued mbufs, as the mbuf
+                                * counts won't match */
+                               break;
                        memset(rte_pktmbuf_mtod(mbuf, char *), 0x00,
                                sizeof(struct ipv4_5tuple));