about summary refs log tree commit diff stats
path: root/src/tools/http_upload.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/http_upload.c')
-rw-r--r--src/tools/http_upload.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/tools/http_upload.c b/src/tools/http_upload.c
index 4dae41c5..289dba15 100644
--- a/src/tools/http_upload.c
+++ b/src/tools/http_upload.c
@@ -399,15 +399,13 @@ file_mime_type(const char* const filename)
     size_t file_header_size = fread(file_header, 1, FILE_HEADER_BYTES, fh);
     fclose(fh);
 
-    char* content_type = g_content_type_guess(filename, (unsigned char*)file_header, file_header_size, NULL);
+    auto_gchar gchar* content_type = g_content_type_guess(filename, (unsigned char*)file_header, file_header_size, NULL);
     if (content_type != NULL) {
-        char* mime_type = g_content_type_get_mime_type(content_type);
+        auto_gchar gchar* mime_type = g_content_type_get_mime_type(content_type);
         out_mime_type = strdup(mime_type);
-        g_free(mime_type);
     } else {
         return strdup(FALLBACK_MIMETYPE);
     }
-    g_free(content_type);
     return out_mime_type;
 }
 
Update dependencies' href='/akspecs/aerc/commit/go.mod?h=0.5.1&id=89f1684ea4b5e680db7ff06a54b2d4e78212cd12'>89f1684 ^
43dba93 ^
f3158b3 ^
89f1684 ^
f3158b3 ^
89f1684 ^

6473848 ^
89f1684 ^



0c2ede5 ^
b2fa5a1 ^
89f1684 ^





513e8aa ^
89f1684 ^
974b22c ^


8d20e92 ^
3f452ca ^
f3158b3 ^
89f1684 ^



974b22c ^
89f1684 ^
3836d24 ^
56b84d3 ^
f3158b3 ^

1f6c108 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48