author | alwin <alwin> | 2003-12-24 14:18:28 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-24 14:18:28 (UTC) |
commit | 9d2a848b254d6c859d7054d486eedac6535d26ec (patch) (side-by-side diff) | |
tree | d3cb3479465b1cc6ef4b67898fc9649f8416c3da /noncore/net/mail/libmailwrapper/imapwrapper.cpp | |
parent | c609fd3341bccf6150e313f4fa08ff3ca9086503 (diff) | |
download | opie-9d2a848b254d6c859d7054d486eedac6535d26ec.zip opie-9d2a848b254d6c859d7054d486eedac6535d26ec.tar.gz opie-9d2a848b254d6c859d7054d486eedac6535d26ec.tar.bz2 |
hopefully fixed some memleaks and some not initialized vars
Diffstat (limited to 'noncore/net/mail/libmailwrapper/imapwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 853e4a2..0178e33 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp @@ -95,11 +95,11 @@ void IMAPwrapper::logout() void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target ) { - const char *mb; + const char *mb = 0; int err = MAILIMAP_NO_ERROR; - clist *result; + clist *result = 0; clistcell *current; // mailimap_fetch_att *fetchAtt,*fetchAttFlags,*fetchAttDate,*fetchAttSize; - mailimap_fetch_type *fetchType; - mailimap_set *set; + mailimap_fetch_type *fetchType = 0; + mailimap_set *set = 0; mb = mailbox.latin1(); @@ -122,5 +122,4 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target ) } - result = clist_new(); /* the range has to start at 1!!! not with 0!!!! */ set = mailimap_set_new_interval( 1, last ); @@ -138,5 +137,4 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target ) if ( err == MAILIMAP_NO_ERROR ) { - mailimap_msg_att * msg_att; int i = 0; @@ -155,5 +153,5 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target ) qDebug("Error fetching headers: %s",m_imap->imap_response); } - mailimap_fetch_list_free(result); + if (result) mailimap_fetch_list_free(result); } |