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 ca4bf8b0d1
commit c12d398fa2

View File

@@ -928,11 +928,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,