bugfix:TSG-9706:修改kni_destroy函数,删除kni_destroy参数传入

This commit is contained in:
fumingwei
2022-02-24 18:37:28 +08:00
parent c4d5eefc60
commit e15a4679a9

View File

@@ -2434,11 +2434,11 @@ error_out:
} }
extern "C" void kni_destroy(struct kni_handle *handle){ extern "C" void kni_destroy(){
if(handle != NULL){ if(g_kni_handle != NULL){
FREE(&handle); FREE(&g_kni_handle);
} }
handle = NULL; g_kni_handle = NULL;
} }
//eliminate_type: 0:FIFO; 1:LRU //eliminate_type: 0:FIFO; 1:LRU
@@ -2746,6 +2746,6 @@ extern "C" int kni_init(){
error_out: error_out:
if(g_kni_handle->arr_last_tfe_dispatch_index) if(g_kni_handle->arr_last_tfe_dispatch_index)
FREE(&(g_kni_handle->arr_last_tfe_dispatch_index)); FREE(&(g_kni_handle->arr_last_tfe_dispatch_index));
kni_destroy(g_kni_handle); kni_destroy();
exit(0); exit(0);
} }