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 <timothy.mcdaniel@intel.com>
This commit is contained in:
Timothy McDaniel 2020-11-05 15:22:52 -06:00 committed by Jerin Jacob
parent 76a1e914d5
commit 47dc89fefa

View File

@ -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,