git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76a1e91
)
event/dlb2: fix mempool query in self test
author
Timothy McDaniel
<timothy.mcdaniel@intel.com>
Thu, 5 Nov 2020 21:22:52 +0000
(15:22 -0600)
committer
Jerin Jacob
<jerinj@marvell.com>
Thu, 12 Nov 2020 17:40:18 +0000
(18:40 +0100)
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>
drivers/event/dlb2/dlb2_selftest.c
patch
|
blob
|
history
diff --git
a/drivers/event/dlb2/dlb2_selftest.c
b/drivers/event/dlb2/dlb2_selftest.c
index
e300067
..
f433654
100644
(file)
--- 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,