[mutter] wayland/data-device: Don't create and leak unused memory on dnd



commit 99c9f4c1fa4abab4cabe9dda0c6ca8f614a73486
Author: Sebastian Keller <skeller gnome org>
Date:   Sun Jun 7 18:42:29 2020 +0200

    wayland/data-device: Don't create and leak unused memory on dnd
    
    "offer" is overwritten with the result of meta_wayland_data_offer_new a
    few lines later.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1293

 src/wayland/meta-wayland-data-device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c
index daf2968532..9231ac5942 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]