gdm r6200 - in branches/gnome-2-20: . common



Author: bcameron
Date: Fri May  2 01:11:05 2008
New Revision: 6200
URL: http://svn.gnome.org/viewvc/gdm?rev=6200&view=rev

Log:
2008-04-30 Brian Cameron <brian cameron sun com>

        * common/gdm-config.c: Similar fix to ensure that we don't free
          the data structure twice when reloading.  Similar issues as
          with bug #517526.


Modified:
   branches/gnome-2-20/ChangeLog
   branches/gnome-2-20/common/gdm-config.c

Modified: branches/gnome-2-20/common/gdm-config.c
==============================================================================
--- branches/gnome-2-20/common/gdm-config.c	(original)
+++ branches/gnome-2-20/common/gdm-config.c	Fri May  2 01:11:05 2008
@@ -1201,8 +1201,22 @@
 	/* if already loaded check whether reload is necessary */
 	if (*key_file != NULL) {
 		if (lmtime > *mtime) {
+
 			/* needs an update */
-			g_key_file_free (*key_file);
+
+                        /*
+                         * As in gdm-config-free, set a local
+                         * variable equal to the memory to 
+                         * free, and set the structure to 
+                         * NULL, so if this function is 
+                         * called again, we do not free the
+                         * same data stucture again.  Similar
+                         * to bug #517526.  Again, this could
+                         * probably be made more thread safe.
+                         */
+			kf = *key_file;
+			*key_file = NULL;
+			g_key_file_free (kf);
 		} else {
 			/* no reload necessary so we're done */
 			return TRUE;



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