wayland: Plug memory leaks

We were forgetting to free the GdkContentFormats
objects in an early exit case.
This commit is contained in:
Matthias Clasen 2018-01-04 22:55:04 -05:00
parent 407d3db2b6
commit 50975be4d0
2 changed files with 2 additions and 0 deletions

View File

@ -303,6 +303,7 @@ gdk_wayland_clipboard_claim_remote (GdkWaylandClipboard *cb,
if (cb->source)
{
GDK_NOTE (CLIPBOARD, g_printerr ("%p: Ignoring clipboard offer for self\n", cb));
gdk_content_formats_unref (formats);
return;
}

View File

@ -100,6 +100,7 @@ gdk_wayland_primary_claim_remote (GdkWaylandPrimary *cb,
if (cb->source)
{
GDK_NOTE (CLIPBOARD, g_printerr ("%p: Ignoring clipboard offer for self\n", cb));
gdk_content_formats_unref (formats);
return;
}