[SERVER-83366] native_sasl_client_session.cpp uses 'new' to create pointers Created: 16/Nov/23  Updated: 20/Nov/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Spencer Jackson Assignee: Backlog - Security Team
Resolution: Unresolved Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Security
Participants:

 Description   

native_sasl_client_session.cpp has a number of function calls like this:

_saslConversation.reset(new SaslPLAINClientConversation(this));

'new' is considered bad form, because it creates objects which for a split second can leak if an exception is thrown. Instead, the code in this file should use make_unique. For example:

_saslConversation = std::make_unique<SaslPLAINClientConversation>(this);


Generated at Thu Feb 08 06:51:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.