Skip to content
Snippets Groups Projects
Commit 638fb546 authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

fix memleak

parent fdcc997a
No related branches found
No related tags found
No related merge requests found
......@@ -92,12 +92,14 @@ Error MongoDBClient::Connect(const std::string& address, const std::string& data
auto err = InitializeClient(address);
if (err) {
CleanUp();
return err;
}
database_name_ = EncodeDbName(database_name);
if (database_name_.size() > maxDbNameLength) {
CleanUp();
return DBErrorTemplates::kWrongInput.Generate("data source name too long");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment