Permalink
Browse files

Fixed a double release issue

  • Loading branch information...
1 parent 4a7a6f8 commit 92cc79a5c6e41a8df7d8d93cf6737f76615b8f0c Ovidiu Sabou committed Sep 21, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 Source/CTMIME_SinglePart.m
@@ -201,8 +201,11 @@ - (struct mailmime *)buildMIMEStruct {
int r;
if (mFilename) {
+ char *charData = (char *)[mFilename cStringUsingEncoding:NSUTF8StringEncoding];
+ char *dupeData = malloc(strlen(charData));
+ strcpy(dupeData, charData);
mime_fields = mailmime_fields_new_filename( MAILMIME_DISPOSITION_TYPE_ATTACHMENT,
- (char *)[mFilename cStringUsingEncoding:NSUTF8StringEncoding],
+ dupeData,
MAILMIME_MECHANISM_BASE64 );
} else {
mime_fields = mailmime_fields_new_encoding(MAILMIME_MECHANISM_BASE64);

0 comments on commit 92cc79a

Please sign in to comment.