Skip to content

Commit

Permalink
BackendMemory::Create must release all errors (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
lhrios authored Feb 7, 2024
1 parent e9f21a8 commit a06e9a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/backend_memory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ BackendMemory::Create(
return TRITONSERVER_ErrorNew(TRITONSERVER_ERROR_UNAVAILABLE, msg.c_str());
}

// If it succeeded we might have to clean up errors associated with
// attempts that failed
for (const auto& pr : errors) {
TRITONSERVER_ErrorDelete(pr.second);
}

return nullptr; // success
}

Expand Down

0 comments on commit a06e9a1

Please sign in to comment.