aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2019-07-02 21:26:29 +0000
committerVincent Richard <[email protected]>2019-07-02 21:26:29 +0000
commit8f4db13e7f45ea0acf1efbcd1c8dcc6520dfd2d2 (patch)
tree398682ae71c79b689a3f249ba9e4689f7d9be67c /src
parentMerge branch 'master' of https://github.com/kisli/vmime (diff)
downloadvmime-8f4db13e7f45ea0acf1efbcd1c8dcc6520dfd2d2.tar.gz
vmime-8f4db13e7f45ea0acf1efbcd1c8dcc6520dfd2d2.zip
#217 Fixed memory leak
Diffstat (limited to 'src')
-rw-r--r--src/vmime/net/smtp/SMTPConnection.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vmime/net/smtp/SMTPConnection.cpp b/src/vmime/net/smtp/SMTPConnection.cpp
index 7680fecf..07d03765 100644
--- a/src/vmime/net/smtp/SMTPConnection.cpp
+++ b/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));