[gtk+] Fix leaking calls to gdk_device_manager_list_devices()
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fix leaking calls to gdk_device_manager_list_devices()
- Date: Mon, 21 Mar 2011 14:37:46 +0000 (UTC)
commit 793d12d70d171d2b50deb7e272612a3af571f677
Author: Garrett Regier <alias301 gmail com>
Date: Sat Mar 19 09:09:27 2011 -0700
Fix leaking calls to gdk_device_manager_list_devices()
gdk_device_manager_list_devices() returns a newly allocated list.
https://bugzilla.gnome.org/show_bug.cgi?id=645234
gdk/gdkwindow.c | 2 ++
gtk/gtkaboutdialog.c | 2 ++
gtk/gtktreeview.c | 2 ++
3 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 8318b99..8341106 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -8903,6 +8903,8 @@ gdk_window_set_source_events (GdkWindow *window,
gdk_window_set_device_events (window, device, event_mask);
}
+ g_list_free (devices);
+
/* Update accounting */
if (G_UNLIKELY (!window->source_event_masks))
window->source_event_masks = g_hash_table_new (NULL, NULL);
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index 8ded837..f9335c0 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -2052,6 +2052,8 @@ text_view_visibility_notify_event (GtkWidget *text_view,
set_cursor_if_appropriate (about, GTK_TEXT_VIEW (text_view), dev, bx, by);
}
+ g_list_free (devices);
+
return FALSE;
}
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 91ee7a5..5ba2252 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -10933,6 +10933,8 @@ send_focus_change (GtkWidget *widget,
gdk_event_free (fevent);
}
+
+ g_list_free (devices);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]