[gtk+] GtkWindow: Don't double free export user data
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkWindow: Don't double free export user data
- Date: Tue, 9 May 2017 15:24:48 +0000 (UTC)
commit 477556aac21c2e7b96554838849b68fcb6a84ec7
Author: Jonas Ådahl <jadahl gmail com>
Date: Tue May 9 23:07:02 2017 +0800
GtkWindow: Don't double free export user data
The user data passed when exporting a Wayland window was supposed to be
freed using the destroy_func, as is commonly done. This was previously
broken, as the user data was just NULL:ed when exported, and only
actually destroyed when unexporting before having exported.
While e016d9a5dba6f6f99aee94d0b72c00bee299b96a fixed this, it introduced
a regression, as GtkWindow was nice enough to free the memory anyway
after having received the exported handle, causing it now to double
free.
https://bugzilla.gnome.org/show_bug.cgi?id=782109
gtk/gtkwindow.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 6efc3cc..813a797 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -11261,8 +11261,6 @@ wayland_window_handle_exported (GdkWindow *window,
handle_str = g_strdup_printf ("wayland:%s", wayland_handle_str);
data->callback (data->window, handle_str, data->user_data);
g_free (handle_str);
-
- g_free (data);
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]