--- gdm-2.19.3/gui/gdmlanguages.c.orig	2007-06-18 12:07:27.000000000 +0900
+++ gdm-2.19.3/gui/gdmlanguages.c	2007-07-11 18:13:14.101035000 +0900
@@ -1055,7 +1055,13 @@ gdm_lang_handler (gpointer user_data)
     {
     case GTK_RESPONSE_OK:
       if (dialog_selected_language)
-        gdm_lang_set_restart_dialog (dialog_selected_language);
+        {
+          gchar *language = g_strdup (dialog_selected_language);
+
+          /* dialog_selected_language will be freed in gdm_lang_set */
+          gdm_lang_set_restart_dialog (language);
+          g_free (language);
+        }
 
       break;
     case GTK_RESPONSE_CANCEL:
