diff --git a/gdk/wayland/gdkdnd-wayland.c b/gdk/wayland/gdkdnd-wayland.c index 3bf40aca5f..05947c5bad 100644 --- a/gdk/wayland/gdkdnd-wayland.c +++ b/gdk/wayland/gdkdnd-wayland.c @@ -129,7 +129,7 @@ _gdk_wayland_drag_context_emit_event (GdkDragContext *context, gdk_event_set_device (event, gdk_drag_context_get_device (context)); gdk_display_put_event (gdk_window_get_display (window), event); - gdk_event_free (event); + g_object_unref (event); } static GdkWindow * diff --git a/gdk/wayland/gdkeventsource.c b/gdk/wayland/gdkeventsource.c index 7016af99c3..688c090b61 100644 --- a/gdk/wayland/gdkeventsource.c +++ b/gdk/wayland/gdkeventsource.c @@ -123,7 +123,7 @@ gdk_event_source_dispatch (GSource *base, { _gdk_event_emit (event); - gdk_event_free (event); + g_object_unref (event); } gdk_threads_leave ();