Commit 87c33e48 authored by Brian Cameron's avatar Brian Cameron Committed by Brian Cameron

Free leaked memory when calling g_strconcat.

2007-03-09  Brian Cameron  <brian.cameron@sun.com>

        * daemon/slave.c, gui/gdmsetup.c: Free leaked memory when
          calling g_strconcat.

svn path=/trunk/; revision=4652
parent b3578532
2007-03-09 Brian Cameron <brian.cameron@sun.com>
* daemon/slave.c, gui/gdmsetup.c: Free leaked memory when
calling g_strconcat.
2007-03-07 William Jon McCann <mccann@jhu.edu>
* daemon/gdmconsolekit.c (open_ck_session):
......
......@@ -2584,7 +2584,10 @@ gdm_slave_greeter (void)
if (ve_string_empty (g_getenv ("PATH"))) {
g_setenv ("PATH", defaultpath, TRUE);
} else if ( ! ve_string_empty (defaultpath)) {
g_setenv ("PATH", g_strconcat (g_getenv ("PATH"), ":", defaultpath, NULL), TRUE);
gchar *temp_string = g_strconcat (g_getenv ("PATH"),
":", defaultpath, NULL);
g_setenv ("PATH", temp_string, TRUE);
g_free (temp_string);
}
g_setenv ("RUNNING_UNDER_GDM", "true", TRUE);
if ( ! ve_string_empty (d->theme_name))
......@@ -3082,7 +3085,10 @@ gdm_slave_chooser (void)
if (ve_string_empty (g_getenv ("PATH"))) {
g_setenv ("PATH", defaultpath, TRUE);
} else if ( ! ve_string_empty (defaultpath)) {
g_setenv ("PATH", g_strconcat (g_getenv ("PATH"), ":", defaultpath, NULL), TRUE);
gchar *temp_string = g_strconcat (g_getenv ("PATH"),
":", defaultpath, NULL);
g_setenv ("PATH", temp_string, TRUE);
g_free (temp_string);
}
g_setenv ("RUNNING_UNDER_GDM", "true", TRUE);
if ( ! ve_string_empty (d->theme_name))
......
......@@ -6396,6 +6396,8 @@ xserver_init_definitions ()
static void
xserver_delete (gpointer data)
{
gchar temp_string;
/* Get xserver section to delete */
GtkWidget *combobox = glade_helper_get (xml_xservers, "xserver_mod_combobox",
GTK_TYPE_COMBO_BOX);
......@@ -6403,8 +6405,9 @@ xserver_delete (gpointer data)
/* Delete xserver section */
VeConfig *custom_cfg = ve_config_get (custom_config_file);
ve_config_delete_section (custom_cfg, g_strconcat (GDM_KEY_SERVER_PREFIX,
section, NULL));
temp_string = g_strconcat (GDM_KEY_SERVER_PREFIX, section, NULL);
ve_config_delete_section (custom_cfg, temp_string);
g_free (temp_string);
/* Reinitialize definitions */
xserver_init_definitions();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment