summaryrefslogtreecommitdiff
path: root/lib/librte_kvargs
diff options
context:
space:
mode:
authorDavid Marchand <david.marchand@6wind.com>2016-01-21 12:23:19 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-01-27 15:34:48 +0100
commitc7985de0a7f0769d6e4e112b18314aceecf2642c (patch)
tree030290c3338c87c5e7284c70c0e481d3cbff793d /lib/librte_kvargs
parent5ce3ace1de458e2ded1b408acfe59c15cf9863f1 (diff)
downloaddpdk-c7985de0a7f0769d6e4e112b18314aceecf2642c.zip
dpdk-c7985de0a7f0769d6e4e112b18314aceecf2642c.tar.gz
dpdk-c7985de0a7f0769d6e4e112b18314aceecf2642c.tar.xz
remove unneeded tests for NULL when freeing
free() already handles NULL pointer. Signed-off-by: David Marchand <david.marchand@6wind.com>
Diffstat (limited to 'lib/librte_kvargs')
-rw-r--r--lib/librte_kvargs/rte_kvargs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/librte_kvargs/rte_kvargs.c b/lib/librte_kvargs/rte_kvargs.c
index c2dd051..8d56abd 100644
--- a/lib/librte_kvargs/rte_kvargs.c
+++ b/lib/librte_kvargs/rte_kvargs.c
@@ -177,9 +177,7 @@ rte_kvargs_free(struct rte_kvargs *kvlist)
if (!kvlist)
return;
- if (kvlist->str != NULL)
- free(kvlist->str);
-
+ free(kvlist->str);
free(kvlist);
}