X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/337b4e616e8f53ba06285b1645e1df9918ed5c16..9322ba2854211794c27fae9468768b80b767c211:/sbr/mime_type.c diff --git a/sbr/mime_type.c b/sbr/mime_type.c index 06a6156d..e4f3e5b8 100644 --- a/sbr/mime_type.c +++ b/sbr/mime_type.c @@ -37,14 +37,15 @@ mime_type(const char *file_name) { 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 */ @@ -123,9 +124,8 @@ get_file_info(const char *proc, const char *file_name) { 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))) {