diff --git a/src/core/meta-clipboard-manager.c b/src/core/meta-clipboard-manager.c index b85d87fd0d300b192c76d98d54218e051741d368..794195f41a8ea5aeb915185359669326ae1edf56 100644 --- a/src/core/meta-clipboard-manager.c +++ b/src/core/meta-clipboard-manager.c @@ -152,6 +152,7 @@ owner_changed_cb (MetaSelection *selection, display->saved_clipboard); g_set_object (&display->selection_source, new_owner); meta_selection_set_owner (selection, selection_type, new_owner); + g_object_unref (new_owner); } } @@ -170,6 +171,7 @@ meta_clipboard_manager_shutdown (MetaDisplay *display) { MetaSelection *selection; + g_clear_object (&display->selection_source); g_clear_pointer (&display->saved_clipboard, g_bytes_unref); g_clear_pointer (&display->saved_clipboard_mimetype, g_free); selection = meta_display_get_selection (display); diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c index daf2968532205be8f389049478a6efc2f9cee359..9231ac594270a8ac734d1f2e5a9b04eec65a1039 100644 --- a/src/wayland/meta-wayland-data-device.c +++ b/src/wayland/meta-wayland-data-device.c @@ -94,7 +94,7 @@ static struct wl_resource * create_and_send_dnd_offer (MetaWaylandDataSource *source, struct wl_resource *target) { - MetaWaylandDataOffer *offer = g_slice_new0 (MetaWaylandDataOffer); + MetaWaylandDataOffer *offer; struct wl_array *mime_types; struct wl_resource *resource; char **p; diff --git a/src/wayland/meta-wayland-data-offer-primary-legacy.c b/src/wayland/meta-wayland-data-offer-primary-legacy.c index ae55a9edcc9b7a7efa89c899d325f8e61895857c..5fe9523d3f59906cafb812fe511dbeccaae3511a 100644 --- a/src/wayland/meta-wayland-data-offer-primary-legacy.c +++ b/src/wayland/meta-wayland-data-offer-primary-legacy.c @@ -51,6 +51,7 @@ transfer_cb (MetaSelection *selection, } g_output_stream_close (stream, NULL, NULL); + g_object_unref (stream); } static void diff --git a/src/wayland/meta-wayland-data-offer-primary.c b/src/wayland/meta-wayland-data-offer-primary.c index 98b7b09107ab4975fb245f5904a44540bbe5e170..a2a4dfe80b236a09f2647048c8e621b5d0dc7a7e 100644 --- a/src/wayland/meta-wayland-data-offer-primary.c +++ b/src/wayland/meta-wayland-data-offer-primary.c @@ -51,6 +51,7 @@ transfer_cb (MetaSelection *selection, } g_output_stream_close (stream, NULL, NULL); + g_object_unref (stream); } static void diff --git a/src/wayland/meta-wayland-data-offer.c b/src/wayland/meta-wayland-data-offer.c index 800d55144aa3ec853409dd086dd073de540b003a..fa14fae1aedc15fff4911a235583549ec2236b99 100644 --- a/src/wayland/meta-wayland-data-offer.c +++ b/src/wayland/meta-wayland-data-offer.c @@ -77,6 +77,7 @@ transfer_cb (MetaSelection *selection, } g_output_stream_close (stream, NULL, NULL); + g_object_unref (stream); } static void diff --git a/src/wayland/meta-xwayland-dnd.c b/src/wayland/meta-xwayland-dnd.c index 5e9d8f8b3416677d87324bb97b772b4b593f7467..cd0f0d3eaa582b44315487404b9cb9aea497c5ae 100644 --- a/src/wayland/meta-xwayland-dnd.c +++ b/src/wayland/meta-xwayland-dnd.c @@ -367,6 +367,7 @@ transfer_cb (MetaSelection *selection, } g_output_stream_close (stream, NULL, NULL); + g_object_unref (stream); } static void