From 832e77fbb40178a8d95dc009acb42d6a6bcaa5c9 Mon Sep 17 00:00:00 2001 From: Pavel Vasin Date: Wed, 21 Aug 2013 15:09:29 +0400 Subject: [PATCH] GdkWaylandWindow: Fix memory leak https://bugzilla.gnome.org/show_bug.cgi?id=706493 --- gdk/wayland/gdkwindow-wayland.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index 52b6136ea6..3d62ddfe96 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -814,6 +814,8 @@ gdk_window_impl_wayland_finalize (GObject *object) if (impl->cursor) g_object_unref (impl->cursor); + g_free (impl->title); + G_OBJECT_CLASS (_gdk_window_impl_wayland_parent_class)->finalize (object); } @@ -1503,7 +1505,8 @@ gdk_wayland_window_set_title (GdkWindow *window, impl = GDK_WINDOW_IMPL_WAYLAND (window->impl); - impl->title = strdup (title); + g_free (impl->title); + impl->title = g_strdup (title); } static void