examples/kni: fix crash on exit
In kni_free_kni(), p[i] should be p[port_id]. Signed-off-by: Hyun Yoo <easetheworld@gmail.com> Acked-by: Helin Zhang <helin.zhang@intel.com>
This commit is contained in:
parent
b7f477920f
commit
10cbac6ae9
@ -830,9 +830,9 @@ kni_free_kni(uint8_t port_id)
|
||||
if (port_id >= RTE_MAX_ETHPORTS || !p[port_id])
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < p[i]->nb_kni; i++) {
|
||||
rte_kni_release(p[i]->kni[i]);
|
||||
p[i]->kni[i] = NULL;
|
||||
for (i = 0; i < p[port_id]->nb_kni; i++) {
|
||||
rte_kni_release(p[port_id]->kni[i]);
|
||||
p[port_id]->kni[i] = NULL;
|
||||
}
|
||||
rte_eth_dev_stop(port_id);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user