author | alwin <alwin> | 2003-12-24 14:48:45 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-24 14:48:45 (UTC) |
commit | 52ccb19535d332f38dcd49f9d115192668c45357 (patch) (unidiff) | |
tree | a13787f882b6b9c664ea91546ce502fcdeda9ed9 /noncore | |
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() | |||
161 | int err = MAILIMAP_NO_ERROR; | 161 | int err = MAILIMAP_NO_ERROR; |
162 | clist *result; | 162 | clist *result = 0; |
163 | clistcell *current; | 163 | clistcell *current = 0; |
164 | 164 | ||
@@ -178,3 +178,2 @@ QList<Folder>* IMAPwrapper::listFolders() | |||
178 | mask = "INBOX" ; | 178 | mask = "INBOX" ; |
179 | result = clist_new(); | ||
180 | mailimap_mailbox_list *list; | 179 | mailimap_mailbox_list *list; |
@@ -204,3 +203,2 @@ QList<Folder>* IMAPwrapper::listFolders() | |||
204 | if (!path) path = ""; | 203 | if (!path) path = ""; |
205 | result = clist_new(); | ||
206 | qDebug(path); | 204 | qDebug(path); |
@@ -230,3 +228,3 @@ QList<Folder>* IMAPwrapper::listFolders() | |||
230 | } | 228 | } |
231 | mailimap_list_result_free( result ); | 229 | if (result) mailimap_list_result_free( result ); |
232 | return folders; | 230 | return folders; |
@@ -349,8 +347,8 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) | |||
349 | int err = MAILIMAP_NO_ERROR; | 347 | int err = MAILIMAP_NO_ERROR; |
350 | clist *result; | 348 | clist *result = 0; |
351 | clistcell *current; | 349 | clistcell *current; |
352 | mailimap_fetch_att *fetchAtt; | 350 | mailimap_fetch_att *fetchAtt = 0; |
353 | mailimap_fetch_type *fetchType; | 351 | mailimap_fetch_type *fetchType = 0; |
354 | mailimap_set *set; | 352 | mailimap_set *set = 0; |
355 | mailimap_body*body_desc; | 353 | mailimap_body*body_desc = 0; |
356 | 354 | ||
@@ -369,3 +367,2 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) | |||
369 | 367 | ||
370 | result = clist_new(); | ||
371 | /* the range has to start at 1!!! not with 0!!!! */ | 368 | /* the range has to start at 1!!! not with 0!!!! */ |
@@ -392,3 +389,3 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) | |||
392 | } | 389 | } |
393 | mailimap_fetch_list_free(result); | 390 | if (result) mailimap_fetch_list_free(result); |
394 | return body; | 391 | return body; |
@@ -511,3 +508,3 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> | |||
511 | 508 | ||
512 | clist*result = clist_new(); | 509 | clist*result = 0; |
513 | 510 | ||
@@ -535,3 +532,3 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> | |||
535 | } | 532 | } |
536 | mailimap_fetch_list_free(result); | 533 | if (result) mailimap_fetch_list_free(result); |
537 | return res; | 534 | 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() | |||
161 | int err = MAILIMAP_NO_ERROR; | 161 | int err = MAILIMAP_NO_ERROR; |
162 | clist *result; | 162 | clist *result = 0; |
163 | clistcell *current; | 163 | clistcell *current = 0; |
164 | 164 | ||
@@ -178,3 +178,2 @@ QList<Folder>* IMAPwrapper::listFolders() | |||
178 | mask = "INBOX" ; | 178 | mask = "INBOX" ; |
179 | result = clist_new(); | ||
180 | mailimap_mailbox_list *list; | 179 | mailimap_mailbox_list *list; |
@@ -204,3 +203,2 @@ QList<Folder>* IMAPwrapper::listFolders() | |||
204 | if (!path) path = ""; | 203 | if (!path) path = ""; |
205 | result = clist_new(); | ||
206 | qDebug(path); | 204 | qDebug(path); |
@@ -230,3 +228,3 @@ QList<Folder>* IMAPwrapper::listFolders() | |||
230 | } | 228 | } |
231 | mailimap_list_result_free( result ); | 229 | if (result) mailimap_list_result_free( result ); |
232 | return folders; | 230 | return folders; |
@@ -349,8 +347,8 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) | |||
349 | int err = MAILIMAP_NO_ERROR; | 347 | int err = MAILIMAP_NO_ERROR; |
350 | clist *result; | 348 | clist *result = 0; |
351 | clistcell *current; | 349 | clistcell *current; |
352 | mailimap_fetch_att *fetchAtt; | 350 | mailimap_fetch_att *fetchAtt = 0; |
353 | mailimap_fetch_type *fetchType; | 351 | mailimap_fetch_type *fetchType = 0; |
354 | mailimap_set *set; | 352 | mailimap_set *set = 0; |
355 | mailimap_body*body_desc; | 353 | mailimap_body*body_desc = 0; |
356 | 354 | ||
@@ -369,3 +367,2 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) | |||
369 | 367 | ||
370 | result = clist_new(); | ||
371 | /* the range has to start at 1!!! not with 0!!!! */ | 368 | /* the range has to start at 1!!! not with 0!!!! */ |
@@ -392,3 +389,3 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) | |||
392 | } | 389 | } |
393 | mailimap_fetch_list_free(result); | 390 | if (result) mailimap_fetch_list_free(result); |
394 | return body; | 391 | return body; |
@@ -511,3 +508,3 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> | |||
511 | 508 | ||
512 | clist*result = clist_new(); | 509 | clist*result = 0; |
513 | 510 | ||
@@ -535,3 +532,3 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> | |||
535 | } | 532 | } |
536 | mailimap_fetch_list_free(result); | 533 | if (result) mailimap_fetch_list_free(result); |
537 | return res; | 534 | return res; |