From 8e6d9d118f6105a3627b64a7949e1fb0b145879e Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 29 Aug 2018 18:59:44 +0100 Subject: New upstream version 16.11.8 Change-Id: I3d0a7da377a86fe41f3516c5a3c458746abc33fb Signed-off-by: Luca Boccassi --- lib/librte_kni/rte_kni.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/librte_kni/rte_kni.c') 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]; -- cgit 1.2.3-korg