From: Timothy McDaniel Date: Thu, 5 Nov 2020 21:22:52 +0000 (-0600) Subject: event/dlb2: fix mempool query in self test X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=47dc89fefaa72d0f108e9847df22167b1ea609b9;p=dpdk.git event/dlb2: fix mempool query in self test Add NULL check before using t->mbuf_pool. Coverity issue: 363719 Fixes: 6f1b828 ("event/dlb2: add self-tests") Signed-off-by: Timothy McDaniel --- diff --git a/drivers/event/dlb2/dlb2_selftest.c b/drivers/event/dlb2/dlb2_selftest.c index e3000676a2..f43365458a 100644 --- a/drivers/event/dlb2/dlb2_selftest.c +++ b/drivers/event/dlb2/dlb2_selftest.c @@ -212,7 +212,12 @@ test_stop_flush(struct test *t) /* test to check we can properly flush events */ goto err; } - count = rte_mempool_avail_count(t->mbuf_pool); + if (t->mbuf_pool) + count = rte_mempool_avail_count(t->mbuf_pool); + else { + printf("%d: mbuf_pool is NULL\n", __LINE__); + goto err; + } if (rte_event_port_attr_get(evdev, 0,