From: Tetsuya Mukawa Date: Thu, 16 Jun 2016 02:33:09 +0000 (+0900) Subject: eal: fix argument parsing check X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3fe2e5fec82becd43b06fafbb5e7e48326f52468;p=dpdk.git eal: fix argument parsing check This patch fixes wrong error checking of rte_eal_parse_devargs_str(). Currently, a return value of strdup() is wrongly checked. Fixes: 0fe11ec592b2 ("eal: add vdev init and uninit") Signed-off-by: Tetsuya Mukawa Acked-by: David Marchand --- diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c index 2bfe54a194..e403717be7 100644 --- a/lib/librte_eal/common/eal_common_devargs.c +++ b/lib/librte_eal/common/eal_common_devargs.c @@ -58,7 +58,7 @@ rte_eal_parse_devargs_str(const char *devargs_str, return -1; *drvname = strdup(devargs_str); - if (drvname == NULL) + if (*drvname == NULL) return -1; /* set the first ',' to '\0' to split name and arguments */