Diffstat (limited to 'noncore/net/mail/libmailwrapper/mboxwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/mboxwrapper.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp index 293ae1b..6d69263 100644 --- a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp @@ -5,4 +5,5 @@ #include <libetpan/mailstorage.h> #include <qdir.h> +#include <stdlib.h> MBOXwrapper::MBOXwrapper(const QString & mbox_dir) @@ -24,8 +25,11 @@ void MBOXwrapper::listMessages(const QString & mailbox, QList<RecMail> &target ) QString p = MBOXPath+"/"; p+=mailbox; + char*fname = 0; - int r = mbox_mailstorage_init(storage,strdup(p.latin1()),0,0,0); + fname = strdup(p.latin1()); + + int r = mbox_mailstorage_init(storage,fname,0,0,0); mailfolder*folder; - folder = mailfolder_new( storage,strdup(p.latin1()),NULL); + folder = mailfolder_new( storage,fname,NULL); r = mailfolder_connect(folder); if (r != MAIL_NO_ERROR) { @@ -33,4 +37,5 @@ void MBOXwrapper::listMessages(const QString & mailbox, QList<RecMail> &target ) mailfolder_free(folder); mailstorage_free(storage); + free(fname); return; } @@ -41,4 +46,5 @@ void MBOXwrapper::listMessages(const QString & mailbox, QList<RecMail> &target ) mailfolder_free(folder); mailstorage_free(storage); + free(fname); return; } @@ -51,4 +57,5 @@ void MBOXwrapper::listMessages(const QString & mailbox, QList<RecMail> &target ) mailfolder_free(folder); mailstorage_free(storage); + free(fname); return; } @@ -104,4 +111,5 @@ void MBOXwrapper::listMessages(const QString & mailbox, QList<RecMail> &target ) mailfolder_free(folder); mailstorage_free(storage); + free(fname); } |