aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_kni/rte_kni.c
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2018-08-29 18:59:44 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2018-08-29 19:00:12 +0100
commit8e6d9d118f6105a3627b64a7949e1fb0b145879e (patch)
tree6494692bc19c7dd9cae2b16cf6e0ed7e90aa1da8 /lib/librte_kni/rte_kni.c
parent43192222b329b3c984687235b0081c7fbfe484ba (diff)
New upstream version 16.11.8upstream/16.11.8
Change-Id: I3d0a7da377a86fe41f3516c5a3c458746abc33fb Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'lib/librte_kni/rte_kni.c')
-rw-r--r--lib/librte_kni/rte_kni.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
index c3f9208c..0c6641bf 100644
--- a/lib/librte_kni/rte_kni.c
+++ b/lib/librte_kni/rte_kni.c
@@ -678,6 +678,9 @@ rte_kni_get(const char *name)
struct rte_kni_memzone_slot *it;
struct rte_kni *kni;
+ if (name == NULL || name[0] == '\0')
+ return NULL;
+
/* Note: could be improved perf-wise if necessary */
for (i = 0; i < kni_memzone_pool.max_ifaces; i++) {
it = &kni_memzone_pool.slots[i];