Skip to content

Commit

Permalink
Fixed a memory leak that popped up when sending messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
mronge committed Sep 3, 2012
1 parent 1840b6e commit 4a7a6f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions MailCore.xcodeproj/project.pbxproj
Expand Up @@ -944,6 +944,7 @@
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -979,6 +980,7 @@
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -1010,6 +1012,7 @@
1DEB91B208733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = "compiler-default";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
Expand All @@ -1026,6 +1029,7 @@
isa = XCBuildConfiguration;
buildSettings = {
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = "compiler-default";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
Expand Down
4 changes: 3 additions & 1 deletion Source/CTMIME.m
Expand Up @@ -106,11 +106,13 @@ - (NSString *)render {
int err = 0;
NSString *resultStr;

mailmime_write_mem(str, &col, [self buildMIMEStruct]);
struct mailmime *mime = [self buildMIMEStruct];
mailmime_write_mem(str, &col, mime);
err = mmap_string_ref(str);
resultStr = [[NSString alloc] initWithBytes:str->str length:str->len
encoding:NSUTF8StringEncoding];
mmap_string_free(str);
mailmime_free(mime);
return [resultStr autorelease];
}

Expand Down

0 comments on commit 4a7a6f8

Please sign in to comment.