author | alwin <alwin> | 2003-12-24 14:48:45 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-24 14:48:45 (UTC) |
commit | 52ccb19535d332f38dcd49f9d115192668c45357 (patch) (side-by-side diff) | |
tree | a13787f882b6b9c664ea91546ce502fcdeda9ed9 | |
parent | 9d2a848b254d6c859d7054d486eedac6535d26ec (diff) | |
download | opie-52ccb19535d332f38dcd49f9d115192668c45357.zip opie-52ccb19535d332f38dcd49f9d115192668c45357.tar.gz opie-52ccb19535d332f38dcd49f9d115192668c45357.tar.bz2 |
some small memleaks again
-rw-r--r-- | noncore/net/mail/imapwrapper.cpp | 25 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 25 |
2 files changed, 22 insertions, 28 deletions
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp index 0178e33..89ec7ab 100644 --- a/noncore/net/mail/imapwrapper.cpp +++ b/noncore/net/mail/imapwrapper.cpp @@ -161,4 +161,4 @@ QList<Folder>* IMAPwrapper::listFolders() int err = MAILIMAP_NO_ERROR; - clist *result; - clistcell *current; + clist *result = 0; + clistcell *current = 0; @@ -178,3 +178,2 @@ QList<Folder>* IMAPwrapper::listFolders() mask = "INBOX" ; - result = clist_new(); mailimap_mailbox_list *list; @@ -204,3 +203,2 @@ QList<Folder>* IMAPwrapper::listFolders() if (!path) path = ""; - result = clist_new(); qDebug(path); @@ -230,3 +228,3 @@ QList<Folder>* IMAPwrapper::listFolders() } - mailimap_list_result_free( result ); + if (result) mailimap_list_result_free( result ); return folders; @@ -349,8 +347,8 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) int err = MAILIMAP_NO_ERROR; - clist *result; + clist *result = 0; clistcell *current; - mailimap_fetch_att *fetchAtt; - mailimap_fetch_type *fetchType; - mailimap_set *set; - mailimap_body*body_desc; + mailimap_fetch_att *fetchAtt = 0; + mailimap_fetch_type *fetchType = 0; + mailimap_set *set = 0; + mailimap_body*body_desc = 0; @@ -369,3 +367,2 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) - result = clist_new(); /* the range has to start at 1!!! not with 0!!!! */ @@ -392,3 +389,3 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) } - mailimap_fetch_list_free(result); + if (result) mailimap_fetch_list_free(result); return body; @@ -511,3 +508,3 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> - clist*result = clist_new(); + clist*result = 0; @@ -535,3 +532,3 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> } - mailimap_fetch_list_free(result); + if (result) mailimap_fetch_list_free(result); return res; diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 0178e33..89ec7ab 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp @@ -161,4 +161,4 @@ QList<Folder>* IMAPwrapper::listFolders() int err = MAILIMAP_NO_ERROR; - clist *result; - clistcell *current; + clist *result = 0; + clistcell *current = 0; @@ -178,3 +178,2 @@ QList<Folder>* IMAPwrapper::listFolders() mask = "INBOX" ; - result = clist_new(); mailimap_mailbox_list *list; @@ -204,3 +203,2 @@ QList<Folder>* IMAPwrapper::listFolders() if (!path) path = ""; - result = clist_new(); qDebug(path); @@ -230,3 +228,3 @@ QList<Folder>* IMAPwrapper::listFolders() } - mailimap_list_result_free( result ); + if (result) mailimap_list_result_free( result ); return folders; @@ -349,8 +347,8 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) int err = MAILIMAP_NO_ERROR; - clist *result; + clist *result = 0; clistcell *current; - mailimap_fetch_att *fetchAtt; - mailimap_fetch_type *fetchType; - mailimap_set *set; - mailimap_body*body_desc; + mailimap_fetch_att *fetchAtt = 0; + mailimap_fetch_type *fetchType = 0; + mailimap_set *set = 0; + mailimap_body*body_desc = 0; @@ -369,3 +367,2 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) - result = clist_new(); /* the range has to start at 1!!! not with 0!!!! */ @@ -392,3 +389,3 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) } - mailimap_fetch_list_free(result); + if (result) mailimap_fetch_list_free(result); return body; @@ -511,3 +508,3 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> - clist*result = clist_new(); + clist*result = 0; @@ -535,3 +532,3 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> } - mailimap_fetch_list_free(result); + if (result) mailimap_fetch_list_free(result); return res; |