Cleanup setting of 'sysroot' in common.gypi
[chromium-blink-merge.git] / base / third_party / xdg_mime / free_pointer_later.patch
blob76687610d528554d072992386ceab33ae5548d7e
1 diff --git a/base/third_party/xdg_mime/xdgmime.c b/base/third_party/xdg_mime/xdgmime.c
2 index c7b16bb..6dc58c2 100644
3 --- a/base/third_party/xdg_mime/xdgmime.c
4 +++ b/base/third_party/xdg_mime/xdgmime.c
5 @@ -558,13 +558,13 @@ xdg_mime_get_mime_type_for_file (const char *file_name,
6 mime_type = _xdg_mime_magic_lookup_data (global_magic, data, bytes_read, NULL,
7 mime_types, n);
9 - free (data);
10 fclose (file);
12 - if (mime_type)
13 - return mime_type;
14 + if (!mime_type)
15 + mime_type = _xdg_binary_or_text_fallback(data, bytes_read);
17 - return _xdg_binary_or_text_fallback(data, bytes_read);
18 + free (data);
19 + return mime_type;
22 const char *