summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2008-05-02 01:11:05 +0000
committerBrian Cameron <bcameron@src.gnome.org>2008-05-02 01:11:05 +0000
commite73a770a733cae7a077926dd7c647bb4f1eaa9dd (patch)
tree1c9231175ccd979c66fcd2f1ff237329fef066c3
parentca83db2fc4600339980082b2cb9adb9363f43da8 (diff)
downloadgdm-e73a770a733cae7a077926dd7c647bb4f1eaa9dd.tar.gz
Similar fix to ensure that we don't free the data structure twice when
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. svn path=/branches/gnome-2-20/; revision=6200
-rw-r--r--ChangeLog6
-rw-r--r--common/gdm-config.c16
2 files changed, 21 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a5abf977..78154d9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
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.
+
+2008-04-30 Brian Cameron <brian.cameron@sun.com>
+
* common/gdm-config.c: A new fix to address the crashing issue bug
#517526.
diff --git a/common/gdm-config.c b/common/gdm-config.c
index d3d2d5a3..37d7276f 100644
--- a/common/gdm-config.c
+++ b/common/gdm-config.c
@@ -1201,8 +1201,22 @@ load_backend (GdmConfig *config,
/* 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;