contentdeserializer: Plug a small memleak

Found by asan in ci. We intern the mimetypes
when they are registered, so there is no need
to leak this string.
This commit is contained in:
Matthias Clasen 2021-10-03 14:51:03 -04:00
parent b4bc7983a6
commit b8622adac5

View File

@ -1008,11 +1008,13 @@ init (void)
if (!g_get_charset (&charset))
{
char *mime = g_strdup_printf ("text/plain;charset=%s", charset);
gdk_content_register_deserializer (mime,
G_TYPE_STRING,
string_deserializer,
(gpointer) charset,
g_free);
g_free (mime);
}
gdk_content_register_deserializer ("text/plain",
G_TYPE_STRING,