From: Daniel Mrzyglod Date: Mon, 9 May 2016 09:38:30 +0000 (+0200) Subject: examples/kni: print release error X-Git-Tag: spdx-start~6921 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3c4a6d00b152cf3b9b5663f6ffe13cac6b5357cf;p=dpdk.git 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 --- 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);