gdk: don't leak wayland primary selection offers
authorJulian Orth <ju.orth@gmail.com>
Tue, 8 Feb 2022 21:47:01 +0000 (22:47 +0100)
committerJulian Orth <ju.orth@gmail.com>
Thu, 10 Feb 2022 19:44:32 +0000 (20:44 +0100)
Signed-off-by: Julian Orth <ju.orth@gmail.com>
gdk/wayland/gdkprimary-wayland.c

index 0cb436a82d9e33e16361c8670c5fda86e0719c26..b8e0ff40fdfdc894331ddffffc8d556d9e64d002 100644 (file)
@@ -101,6 +101,7 @@ gdk_wayland_primary_claim_remote (GdkWaylandPrimary                     *cb,
     {
       GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD, g_message ("%p: Ignoring clipboard offer for self", cb));
       gdk_content_formats_unref (formats);
+      g_clear_pointer (&offer, zwp_primary_selection_offer_v1_destroy);
       return;
     }