summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDaniel Mrzyglod <danielx.t.mrzyglod@intel.com>2016-05-09 11:38:30 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-05-16 14:48:09 +0200
commit3c4a6d00b152cf3b9b5663f6ffe13cac6b5357cf (patch)
tree5aa3ebef733938f0cce0958331e95ae2b88a00d3 /examples
parent42b3f505581ce30ef1f83b96409755f70068d2eb (diff)
downloaddpdk-3c4a6d00b152cf3b9b5663f6ffe13cac6b5357cf.zip
dpdk-3c4a6d00b152cf3b9b5663f6ffe13cac6b5357cf.tar.gz
dpdk-3c4a6d00b152cf3b9b5663f6ffe13cac6b5357cf.tar.xz
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 <danielx.t.mrzyglod@intel.com> Acked-by: Helin Zhang <helin.zhang@intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/kni/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/kni/main.c b/examples/kni/main.c
index a5297f2..0cf23e7 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);