Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes a crasher that could occur when tearing down the CTMIME_SingleP…

…art in an error condition. (Thanks Daishi)
  • Loading branch information...
commit 859c5b794fa37ff5c2d6f8433836ed4bfef7391f 1 parent 406bd77
@mronge mronge authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 Source/CTMIME_SinglePart.m
View
6 Source/CTMIME_SinglePart.m
@@ -152,7 +152,7 @@ - (BOOL)fetchPartWithProgress:(CTProgressBlock)block {
if (mimeFields != NULL && mimeFields->fld_encoding != NULL)
encoding = mimeFields->fld_encoding->enc_type;
- char *fetchedData;
+ char *fetchedData = NULL;
size_t fetchedDataLen;
int r;
@@ -164,7 +164,9 @@ - (BOOL)fetchPartWithProgress:(CTProgressBlock)block {
mailimap_set_progress_callback(get_imap_session(mMessage), NULL, NULL, NULL);
}
if (r != MAIL_NO_ERROR) {
- mailmessage_fetch_result_free(mMessage, fetchedData);
+ if (fetchedData) {
+ mailmessage_fetch_result_free(mMessage, fetchedData);
+ }
self.lastError = MailCoreCreateErrorFromIMAPCode(r);
return NO;
}
Please sign in to comment.
Something went wrong with that request. Please try again.