[gtk+/composite-templates] application: fix double free of app_id



commit 6c0bddb063727c2613fec455ff27e0615b264022
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Jul 5 16:40:23 2012 -0400

    application: fix double free of app_id
    
    This is fallout from commit 257b42e2f9d0759cc79967034f80c571c600faf3 -
    those fields were already getting freed in
    gtk_application_shutdown_x11() and my commit caused crashes on quit
    instead.
    
    Thanks to Rico Tzschichholz for reporting the bug and testing this fix.

 gtk/gtkapplication.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index f5c3449..bd897d7 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -297,6 +297,9 @@ gtk_application_shutdown_x11 (GtkApplication *application)
   g_clear_object (&application->priv->client_proxy);
   g_free (application->priv->app_id);
   g_free (application->priv->client_path);
+
+  g_free (application->priv->app_menu_path);
+  g_free (application->priv->menubar_path);
 }
 
 const gchar *
@@ -666,17 +669,6 @@ gtk_application_finalize (GObject *object)
   g_clear_object (&application->priv->app_menu);
   g_clear_object (&application->priv->menubar);
 
-#ifdef GDK_WINDOWING_X11
-  g_free (application->priv->app_menu_path);
-  g_free (application->priv->menubar_path);
-
-  g_free (application->priv->client_path);
-  g_free (application->priv->app_id);
-
-  g_clear_object (&application->priv->sm_proxy);
-  g_clear_object (&application->priv->client_proxy);
-#endif
-
   G_OBJECT_CLASS (gtk_application_parent_class)
     ->finalize (object);
 }



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