From: Jan Blunck Date: Tue, 11 Jul 2017 23:15:48 +0000 (-0400) Subject: bus/vdev: allocate empty arguments string X-Git-Tag: spdx-start~2523 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=db2592be2f8ba6bab030e4868bc664e6c1f9e29f;p=dpdk.git bus/vdev: allocate empty arguments string Signed-off-by: Jan Blunck Acked-by: Gaetan Rivet --- 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)) {