[gtk+] GtkClipboardWayland: Fix memory leak
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gtk+] GtkClipboardWayland: Fix memory leak
- Date: Sat, 31 Aug 2013 16:39:47 +0000 (UTC)
commit 2df6174038d56c9a458cc62f002dbc78086f0b98
Author: Pavel Vasin <rat4vier gmail com>
Date:   Wed Aug 21 14:59:45 2013 +0400
    GtkClipboardWayland: Fix memory leak
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706493
 gtk/gtkclipboard-wayland.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkclipboard-wayland.c b/gtk/gtkclipboard-wayland.c
index 925de30..328ba4d 100644
--- a/gtk/gtkclipboard-wayland.c
+++ b/gtk/gtkclipboard-wayland.c
@@ -278,6 +278,7 @@ gtk_clipboard_wayland_request_contents (GtkClipboard            *gtkclipboard,
   GdkDeviceManager *device_manager;
   GdkDevice *device;
   ClipboardRequestClosure *closure;
+  gchar *mime_type;
 
   device_manager = gdk_display_get_device_manager (gdk_display_get_default ());
   device = gdk_device_manager_get_client_pointer (device_manager);
@@ -312,10 +313,14 @@ gtk_clipboard_wayland_request_contents (GtkClipboard            *gtkclipboard,
   closure->target = target;
 
   /* TODO: Do we need to check that target is valid ? */
+  mime_type = gdk_atom_name (target);
+
   gdk_wayland_device_request_selection_content (device,
-                                                gdk_atom_name (target),
+                                                mime_type,
                                                 _request_generic_cb,
                                                 closure);
+
+  g_free (mime_type);
 }
 
 static void
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]