if ((mimeencoding = get_file_info(MIMEENCODINGPROC, file_name))) {
content_type = concat(mimetype, "; charset=", mimeencoding,
NULL);
+ free (mimetype);
} else {
- content_type = strdup(mimetype);
+ content_type = mimetype;
}
} else {
- content_type = strdup(mimetype);
+ content_type = mimetype;
}
#else /* MIMEENCODINGPROC */
- content_type = strdup(mimetype);
+ content_type = mimetype;
#endif /* MIMEENCODINGPROC */
}
#endif /* MIMETYPEPROC */
advise(NULL, "filenames containing both single and double quotes "
"are unsupported for attachment");
return NULL;
- } else {
- quotec = "\"";
}
+ quotec = "\"";
}
if ((cmd = concat(proc, " ", quotec, file_name, quotec, NULL))) {