The rte_kvargs_process() was used to parse KV pairs, it also supports to parse 'only keys' (e.g. socket_id) type. And the callback function parameter 'value' is NULL when parsed 'only keys'.
This patch fixes segment fault when parse input args with 'only keys'. Fixes: 77b5311d0ece ("event/dpaa: support select based event") Cc: sta...@dpdk.org Signed-off-by: Chengwen Feng <fengcheng...@huawei.com> --- drivers/event/dpaa/dpaa_eventdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c index 4b3d16735b..0d5593e862 100644 --- a/drivers/event/dpaa/dpaa_eventdev.c +++ b/drivers/event/dpaa/dpaa_eventdev.c @@ -959,6 +959,9 @@ static struct eventdev_ops dpaa_eventdev_ops = { static int flag_check_handler(__rte_unused const char *key, const char *value, __rte_unused void *opaque) { + if (value == NULL) + return -EINVAL; + if (strcmp(value, "1")) return -1; -- 2.17.1