[gimp] app: free the string returned by gimp_dock_window_get_description()



commit 865a1f4896522e2d8c9bd4405e63402857f43ef6
Author: Michael Natterer <mitch gimp org>
Date:   Tue Jun 22 23:05:06 2010 +0200

    app: free the string returned by gimp_dock_window_get_description()

 app/widgets/gimpdockwindow.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpdockwindow.c b/app/widgets/gimpdockwindow.c
index 580729f..d5de026 100644
--- a/app/widgets/gimpdockwindow.c
+++ b/app/widgets/gimpdockwindow.c
@@ -736,8 +736,11 @@ gimp_dock_window_update_title_idle (GimpDockWindow *dock_window)
 {
   gchar *desc = gimp_dock_window_get_description (dock_window,
                                                   FALSE /*complete*/);
-  if (desc != NULL)
-    gtk_window_set_title (GTK_WINDOW (dock_window), desc);
+  if (desc)
+    {
+      gtk_window_set_title (GTK_WINDOW (dock_window), desc);
+      g_free (desc);
+    }
 
   dock_window->p->update_title_idle_id = 0;
 



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