X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_kvargs%2Frte_kvargs.c;h=285081c86c75afb5effbe50fc78c1352bd9927d8;hb=ea84b3ebe0def34a5a1e3a81dd13375bd37d4c4b;hp=1d815dcd96341ff1261869045bbbacfb038c9ea3;hpb=37924a2f078615c5bdac226a90cd63f686f9e7b1;p=dpdk.git diff --git a/lib/librte_kvargs/rte_kvargs.c b/lib/librte_kvargs/rte_kvargs.c index 1d815dcd96..285081c86c 100644 --- a/lib/librte_kvargs/rte_kvargs.c +++ b/lib/librte_kvargs/rte_kvargs.c @@ -50,7 +50,7 @@ rte_kvargs_tokenize(struct rte_kvargs *kvlist, const char *params) /* Find the end of the list. */ while (str[strlen(str) - 1] != ']') { /* Restore the comma erased by strtok_r(). */ - if (ctx1[0] == '\0') + if (ctx1 == NULL || ctx1[0] == '\0') return -1; /* no closing bracket */ str[strlen(str)] = ','; /* Parse until next comma. */