aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/maildir/maildirMessage.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2009-12-08 10:03:34 +0000
committerVincent Richard <[email protected]>2009-12-08 10:03:34 +0000
commita3bf37fb4f758469b7b68ad7dcca170913fcd912 (patch)
tree9004b6aca2e4e749212f959011417d52f21c5cb9 /src/net/maildir/maildirMessage.cpp
parentInitialize multi-threading for GNUTLS/GCrypt (thanks to Bartek Szurgot). (diff)
downloadvmime-a3bf37fb4f758469b7b68ad7dcca170913fcd912.tar.gz
vmime-a3bf37fb4f758469b7b68ad7dcca170913fcd912.zip
Fixed not exception-safe constructor, which could lead to possible memory leak (thanks to Bartek Szurgot). Get rid of const-ness on factories.
Diffstat (limited to 'src/net/maildir/maildirMessage.cpp')
-rw-r--r--src/net/maildir/maildirMessage.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/maildir/maildirMessage.cpp b/src/net/maildir/maildirMessage.cpp
index ed87cdb3..8999d847 100644
--- a/src/net/maildir/maildirMessage.cpp
+++ b/src/net/maildir/maildirMessage.cpp
@@ -346,7 +346,7 @@ void maildirMessage::extractImpl(utility::outputStream& os, utility::progressLis
{
ref <const maildirFolder> folder = m_folder.acquire();
- utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
+ ref <utility::fileSystemFactory> fsf = platform::getHandler()->getFileSystemFactory();
const utility::file::path path = folder->getMessageFSPath(m_num);
ref <utility::file> file = fsf->create(path);
@@ -393,7 +393,7 @@ void maildirMessage::fetchPartHeader(ref <part> p)
ref <maildirPart> mp = p.dynamicCast <maildirPart>();
- utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
+ ref <utility::fileSystemFactory> fsf = platform::getHandler()->getFileSystemFactory();
const utility::file::path path = folder->getMessageFSPath(m_num);
ref <utility::file> file = fsf->create(path);
@@ -430,7 +430,7 @@ void maildirMessage::fetch(ref <maildirFolder> msgFolder, const int options)
if (folder != msgFolder)
throw exceptions::folder_not_found();
- utility::fileSystemFactory* fsf = platform::getHandler()->getFileSystemFactory();
+ ref <utility::fileSystemFactory> fsf = platform::getHandler()->getFileSystemFactory();
const utility::file::path path = folder->getMessageFSPath(m_num);
ref <utility::file> file = fsf->create(path);