!6404 fix eagleEye check

Merge pull request !6404 from gukecai/codex
This commit is contained in:
mindspore-ci-bot 2020-09-17 19:48:39 +08:00 committed by Gitee
commit c55bd78ce5
1 changed files with 4 additions and 0 deletions

View File

@ -96,6 +96,10 @@ Status CallbackManager::RegisterCallback(rtCallback_t callback, const void *user
ret = rtEventRecord(event, stream_);
if (ret != RT_ERROR_NONE) {
MS_LOG(ERROR) << "Record event failed";
auto flag = rtEventDestroy(event);
if (flag != RT_ERROR_NONE) {
MS_LOG(ERROR) << "rtEventDestroy failed";
}
return kFail;
}
auto cb = std::pair<rtCallback_t, const void *>(callback, user_data);