diff options
-rw-r--r-- | src/core/basetypes/MCString.cpp | 4 | ||||
-rw-r--r-- | src/objc/imap/MCOIMAPCheckAccountOperation.mm | 1 | ||||
-rw-r--r-- | src/objc/smtp/MCOSMTPOperation.mm | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/core/basetypes/MCString.cpp b/src/core/basetypes/MCString.cpp index aad82580..991d7963 100644 --- a/src/core/basetypes/MCString.cpp +++ b/src/core/basetypes/MCString.cpp @@ -1000,7 +1000,9 @@ void String::appendUTF8CharactersLength(const char * UTF8Characters, unsigned in void String::appendUTF8Characters(const char * UTF8Characters) { - appendUTF8CharactersLength(UTF8Characters, (unsigned int) strlen(UTF8Characters)); + if (UTF8Characters != NULL) { + appendUTF8CharactersLength(UTF8Characters, (unsigned int) strlen(UTF8Characters)); + } } void String::appendCharacters(const UChar * unicodeCharacters) diff --git a/src/objc/imap/MCOIMAPCheckAccountOperation.mm b/src/objc/imap/MCOIMAPCheckAccountOperation.mm index 8117df2e..0c6161c4 100644 --- a/src/objc/imap/MCOIMAPCheckAccountOperation.mm +++ b/src/objc/imap/MCOIMAPCheckAccountOperation.mm @@ -66,6 +66,7 @@ typedef void (^CompletionType)(NSError *error); NSMutableDictionary * userInfo = [[error userInfo] mutableCopy]; userInfo[MCOIMAPResponseKey] = MCO_TO_OBJC(op->loginResponse()); error = [NSError errorWithDomain:[error domain] code:[error code] userInfo:userInfo]; + [userInfo release]; } _completionBlock(error); } diff --git a/src/objc/smtp/MCOSMTPOperation.mm b/src/objc/smtp/MCOSMTPOperation.mm index 3ff939c6..3bf2af08 100644 --- a/src/objc/smtp/MCOSMTPOperation.mm +++ b/src/objc/smtp/MCOSMTPOperation.mm @@ -70,6 +70,7 @@ typedef void (^CompletionType)(NSError *error); userInfo[MCOSMTPResponseCodeKey] = @(op->lastSMTPResponseCode()); } error = [NSError errorWithDomain:[error domain] code:[error code] userInfo:userInfo]; + [userInfo release]; } } return error; |