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:
30cf171
)
eventdev: check input parameter for dump op
author
David Marchand
<david.marchand@redhat.com>
Sun, 1 Nov 2020 20:36:44 +0000
(21:36 +0100)
committer
Jerin Jacob
<jerinj@marvell.com>
Mon, 2 Nov 2020 13:46:51 +0000
(14:46 +0100)
Rather than have drivers check for this, let's ensure the passed FILE *
is not NULL.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
lib/librte_eventdev/rte_eventdev.c
patch
|
blob
|
history
diff --git
a/lib/librte_eventdev/rte_eventdev.c
b/lib/librte_eventdev/rte_eventdev.c
index
994bd1e
..
afbadc5
100644
(file)
--- a/
lib/librte_eventdev/rte_eventdev.c
+++ b/
lib/librte_eventdev/rte_eventdev.c
@@
-1153,6
+1153,8
@@
rte_event_dev_dump(uint8_t dev_id, FILE *f)
RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
dev = &rte_eventdevs[dev_id];
RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dump, -ENOTSUP);
+ if (f == NULL)
+ return -EINVAL;
(*dev->dev_ops->dump)(dev, f);
return 0;