!8009 fix memory leak in kernel_registry

Merge pull request !8009 from hangq/primitive
This commit is contained in:
mindspore-ci-bot 2020-10-30 10:32:46 +08:00 committed by Gitee
commit 7f58cd214d
1 changed files with 2 additions and 0 deletions

View File

@ -120,6 +120,8 @@ kernel::LiteKernel *KernelRegistry::GetKernel(const std::vector<Tensor *> &in_te
kernel->set_desc(key);
}
return kernel;
} else {
free(parameter);
}
return nullptr;
}