]> diplodocus.org Git - nmh/blobdiff - sbr/mime_type.c
Another pass at cleaning up (some of) the manpages.
[nmh] / sbr / mime_type.c
index 06a6156d418294c0754742c2bc199835d19a8cf0..23ccf0387fec78a7d11978522a00d80a21390efe 100644 (file)
@@ -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 */