[dpdk-dev] [PATCH v2 3/3] vdev: allocate empty str args
Jan Blunck
jblunck at infradead.org
Wed Jul 12 01:15:48 CEST 2017
Signed-off-by: Jan Blunck <jblunck at infradead.org>
---
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 5abdba091..e00dda9aa 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.13.2
More information about the dev
mailing list