Skip to content

Commit

Permalink
BackendMemory::Create must release all errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lhrios committed Jan 15, 2024
1 parent e9f21a8 commit 4be0c01
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 4be0c01

Please sign in to comment.