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 @@ -6,2 +6,3 @@ #include <qdir.h> +#include <stdlib.h> @@ -25,6 +26,9 @@ void MBOXwrapper::listMessages(const QString & mailbox, QList<RecMail> &target ) 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); @@ -34,2 +38,3 @@ void MBOXwrapper::listMessages(const QString & mailbox, QList<RecMail> &target ) mailstorage_free(storage); + free(fname); return; @@ -42,2 +47,3 @@ void MBOXwrapper::listMessages(const QString & mailbox, QList<RecMail> &target ) mailstorage_free(storage); + free(fname); return; @@ -52,2 +58,3 @@ void MBOXwrapper::listMessages(const QString & mailbox, QList<RecMail> &target ) mailstorage_free(storage); + free(fname); return; @@ -105,2 +112,3 @@ void MBOXwrapper::listMessages(const QString & mailbox, QList<RecMail> &target ) mailstorage_free(storage); + free(fname); } |