Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed a double release issue
  • Loading branch information
Ovidiu Sabou committed Sep 21, 2012
1 parent 4a7a6f8 commit 92cc79a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/CTMIME_SinglePart.m
Expand Up @@ -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);
Expand Down

0 comments on commit 92cc79a

Please sign in to comment.