diff options
author | Brian Cameron <brian.cameron@sun.com> | 2008-05-02 01:11:05 +0000 |
---|---|---|
committer | Brian Cameron <bcameron@src.gnome.org> | 2008-05-02 01:11:05 +0000 |
commit | e73a770a733cae7a077926dd7c647bb4f1eaa9dd (patch) | |
tree | 1c9231175ccd979c66fcd2f1ff237329fef066c3 | |
parent | ca83db2fc4600339980082b2cb9adb9363f43da8 (diff) | |
download | gdm-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-- | ChangeLog | 6 | ||||
-rw-r--r-- | common/gdm-config.c | 16 |
2 files changed, 21 insertions, 1 deletions
@@ -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; |