Skip to content
Permalink
Browse files

#217 Fixed memory leak

  • Loading branch information...
vincent-richard committed Jul 2, 2019
1 parent e2fc191 commit 8f4db13e7f45ea0acf1efbcd1c8dcc6520dfd2d2
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/vmime/net/smtp/SMTPConnection.cpp
@@ -341,11 +341,12 @@ void SMTPConnection::authenticate() {
const string password = getAuthenticator()->getPassword();
const string authToken = username + '\0' + username + '\0' + password;

auto encoder = new vmime::utility::encoder::b64Encoder();
utility::inputStreamStringAdapter in(authToken);
string authTokenBase64;
utility::outputStreamStringAdapter out(authTokenBase64);
encoder->encode(in, out);

vmime::utility::encoder::b64Encoder encoder;
encoder.encode(in, out);

sendRequest(SMTPCommand::AUTH(plain, authTokenBase64));

0 comments on commit 8f4db13

Please sign in to comment.
You can’t perform that action at this time.