clipboard-manager: Plug mimetypes list leak

Fixes https://gitlab.gnome.org/GNOME/mutter/issues/1005
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1001
This commit is contained in:
Sebastian Keller 2020-01-11 03:29:29 +01:00 committed by Robert Mader
parent c1bdaba5ac
commit 05301d280c

View File

@ -122,13 +122,17 @@ owner_changed_cb (MetaSelection *selection,
}
if (best_idx < 0)
{
g_list_free_full (mimetypes, g_free);
return;
}
display->saved_clipboard_mimetype = g_strdup (best);
g_list_free_full (mimetypes, g_free);
output = g_memory_output_stream_new_resizable ();
meta_selection_transfer_async (selection,
META_SELECTION_CLIPBOARD,
best,
display->saved_clipboard_mimetype,
transfer_size,
output,
NULL,