From db2592be2f8ba6bab030e4868bc664e6c1f9e29f Mon Sep 17 00:00:00 2001 From: Jan Blunck Date: Tue, 11 Jul 2017 19:15:48 -0400 Subject: [PATCH] bus/vdev: allocate empty arguments string Signed-off-by: Jan Blunck Acked-by: Gaetan Rivet --- lib/librte_eal/common/eal_common_vdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c index 5abdba0910..e00dda9aa3 100644 --- a/lib/librte_eal/common/eal_common_vdev.c +++ b/lib/librte_eal/common/eal_common_vdev.c @@ -144,6 +144,8 @@ alloc_devargs(const char *name, const char *args) devargs->bus = &rte_vdev_bus; if (args) devargs->args = strdup(args); + else + devargs->args = strdup(""); ret = snprintf(devargs->name, sizeof(devargs->name), "%s", name); if (ret < 0 || ret >= (int)sizeof(devargs->name)) { -- 2.20.1