gnome-session r4710 - in trunk: . gnome-session
- From: lucasr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-session r4710 - in trunk: . gnome-session
- Date: Tue, 27 May 2008 20:53:12 +0000 (UTC)
Author: lucasr
Date: Tue May 27 20:53:12 2008
New Revision: 4710
URL: http://svn.gnome.org/viewvc/gnome-session?rev=4710&view=rev
Log:
2008-05-27 Lucas Rocha <lucasr gnome org>
* gnome-session/session.c, gnome-session/xsmp.c, gnome-session/app.c:
fixed several memory leaks. #534641, Kjartan Maraas.
Modified:
trunk/ChangeLog
trunk/gnome-session/app.c
trunk/gnome-session/session.c
trunk/gnome-session/xsmp.c
Modified: trunk/gnome-session/app.c
==============================================================================
--- trunk/gnome-session/app.c (original)
+++ trunk/gnome-session/app.c Tue May 27 20:53:12 2008
@@ -48,6 +48,7 @@
const GValue *value, GParamSpec *pspec);
static void get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec);
+static void dispose (GObject *object);
static pid_t launch (GsmApp *app, GError **err);
@@ -66,6 +67,7 @@
object_class->set_property = set_property;
object_class->get_property = get_property;
+ object_class->dispose = dispose;
app_class->launch = launch;
@@ -190,6 +192,30 @@
}
}
+static void
+dispose(GObject *object)
+{
+ GsmApp *app = GSM_APP (object);
+
+ if (app->desktop_file)
+ {
+ egg_desktop_file_free (app->desktop_file);
+ app->desktop_file = NULL;
+ }
+
+ if (app->startup_id)
+ {
+ g_free (app->startup_id);
+ app->startup_id = NULL;
+ }
+
+ if (app->client_id)
+ {
+ g_free (app->client_id);
+ app->client_id = NULL;
+ }
+}
+
/**
* gsm_app_get_basename:
* @app: a %GsmApp
Modified: trunk/gnome-session/session.c
==============================================================================
--- trunk/gnome-session/session.c (original)
+++ trunk/gnome-session/session.c Tue May 27 20:53:12 2008
@@ -255,6 +255,7 @@
}
g_free (desktop_file);
+ g_key_file_free (key_file);
}
g_slist_foreach (default_apps, (GFunc) g_free, NULL);
Modified: trunk/gnome-session/xsmp.c
==============================================================================
--- trunk/gnome-session/xsmp.c (original)
+++ trunk/gnome-session/xsmp.c Tue May 27 20:53:12 2008
@@ -157,6 +157,10 @@
xsmp_sockets = listeners;
else
{
+#ifdef HAVE_X11_XTRANS_XTRANS_H
+ char *network_id_list;
+#endif
+
/* Xtrans was apparently compiled with support for some
* non-local transport besides TCP (which we disabled above). We
* close those additional sockets here. (There's no API for
@@ -171,9 +175,12 @@
listeners[local_listener] = listeners[num_listeners - 1];
#ifdef HAVE_X11_XTRANS_XTRANS_H
+ network_id_list = IceComposeNetworkIdList (num_listeners - 1, listeners);
+
g_warning ("IceListenForConnections returned %d non-local listeners: %s",
- num_listeners - 1,
- IceComposeNetworkIdList (num_listeners - 1, listeners));
+ num_listeners - 1, network_id_list);
+
+ g_free (network_id_list);
#endif
IceFreeListenObjs (num_listeners - 1, listeners);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]