gnome-session r5015 - in trunk: . egg gnome-session



Author: mccann
Date: Fri Aug 29 21:20:53 2008
New Revision: 5015
URL: http://svn.gnome.org/viewvc/gnome-session?rev=5015&view=rev

Log:
2008-08-29  William Jon McCann  <jmccann redhat com>

	* egg/eggdesktopfile.c (egg_desktop_file_new_from_key_file),
	(egg_desktop_file_launchv):
	* gnome-session/gsm-autostart-app.c (setup_condition_monitor),
	(is_conditionally_disabled):
	* gnome-session/gsm-resumed-app.c
	(gsm_resumed_app_new_from_legacy_session):
	* gnome-session/gsm-xsmp-client.c (gsm_xsmp_client_finalize),
	(register_client_callback):
	Fix some leaks found by valgrind.
	Patch from: Matthias Clasen <mclasen redhat com>



Modified:
   trunk/ChangeLog
   trunk/egg/eggdesktopfile.c
   trunk/gnome-session/gsm-autostart-app.c
   trunk/gnome-session/gsm-resumed-app.c
   trunk/gnome-session/gsm-xsmp-client.c

Modified: trunk/egg/eggdesktopfile.c
==============================================================================
--- trunk/egg/eggdesktopfile.c	(original)
+++ trunk/egg/eggdesktopfile.c	Fri Aug 29 21:20:53 2008
@@ -190,7 +190,6 @@
 	  g_key_file_free (key_file);
 	  return NULL;
 	}
-      else 
       g_free (version);
     }
 
@@ -231,6 +230,7 @@
       if (!exec)
 	{
 	  egg_desktop_file_free (desktop_file);
+	  g_free (type);
 	  return NULL;
 	}
 
@@ -263,6 +263,7 @@
       if (!url)
 	{
 	  egg_desktop_file_free (desktop_file);
+	  g_free (type);
 	  return NULL;
 	}
       g_free (url);
@@ -1272,6 +1273,7 @@
  out:
   if (env)
     {
+      g_ptr_array_foreach (env, (GFunc)g_free, NULL);
       g_ptr_array_free (env, TRUE);
     }
   free_document_list (translated_documents);

Modified: trunk/gnome-session/gsm-autostart-app.c
==============================================================================
--- trunk/gnome-session/gsm-autostart-app.c	(original)
+++ trunk/gnome-session/gsm-autostart-app.c	Fri Aug 29 21:20:53 2008
@@ -301,6 +301,7 @@
         key = NULL;
         res = parse_condition_string (app->priv->condition_string, &kind, &key);
         if (! res) {
+                g_free (key);
                 return;
         }
 
@@ -367,6 +368,8 @@
                 disabled = TRUE;
         }
 
+        g_free (key);
+
         /* FIXME: cache the disabled value? */
 }
 
@@ -609,6 +612,7 @@
         key = NULL;
         res = parse_condition_string (priv->condition_string, &kind, &key);
         if (! res) {
+                g_free (key);
                 return TRUE;
         }
 
@@ -641,6 +645,8 @@
         /* Set initial condition */
         priv->condition = !disabled;
 
+        g_free (key);
+
         return disabled;
 }
 

Modified: trunk/gnome-session/gsm-resumed-app.c
==============================================================================
--- trunk/gnome-session/gsm-resumed-app.c	(original)
+++ trunk/gnome-session/gsm-resumed-app.c	Fri Aug 29 21:20:53 2008
@@ -228,6 +228,7 @@
         app = g_object_new (GSM_TYPE_RESUMED_APP,
                             "startup-id", id,
                             NULL);
+        g_free (id);
 
         key = g_strdup_printf ("%d," SmProgram, n);
         val = g_key_file_get_string (session_file, "Default", key, NULL);

Modified: trunk/gnome-session/gsm-xsmp-client.c
==============================================================================
--- trunk/gnome-session/gsm-xsmp-client.c	(original)
+++ trunk/gnome-session/gsm-xsmp-client.c	Fri Aug 29 21:20:53 2008
@@ -639,6 +639,8 @@
         gsm_xsmp_client_disconnect (client);
 
         g_free (client->priv->description);
+        g_ptr_array_foreach (client->priv->props, (GFunc)SmFreeProperty, NULL);
+        g_ptr_array_free (client->priv->props, TRUE);
 
         G_OBJECT_CLASS (gsm_xsmp_client_parent_class)->finalize (object);
 }
@@ -861,6 +863,8 @@
 
         gsm_client_set_status (GSM_CLIENT (client), GSM_CLIENT_REGISTERED);
 
+        g_free (id);
+
         return TRUE;
 }
 



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