From 3c4a6d00b152cf3b9b5663f6ffe13cac6b5357cf Mon Sep 17 00:00:00 2001 From: Daniel Mrzyglod Date: Mon, 9 May 2016 11:38:30 +0200 Subject: [PATCH] examples/kni: print release error In kni_free_kni: Value returned from a function is not checked for errors before being used Coverity issue: 30692 Fixes: b475eb0bc400 ("examples/kni: new parameters") Signed-off-by: Daniel Mrzyglod Acked-by: Helin Zhang --- examples/kni/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/kni/main.c b/examples/kni/main.c index a5297f281c..0cf23e771d 100644 --- a/examples/kni/main.c +++ b/examples/kni/main.c @@ -831,7 +831,8 @@ kni_free_kni(uint8_t port_id) return -1; for (i = 0; i < p[port_id]->nb_kni; i++) { - rte_kni_release(p[port_id]->kni[i]); + if (rte_kni_release(p[port_id]->kni[i])) + printf("Fail to release kni\n"); p[port_id]->kni[i] = NULL; } rte_eth_dev_stop(port_id); -- 2.20.1