summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2006-10-06 00:54:44 +0000
committerBrian Cameron <bcameron@src.gnome.org>2006-10-06 00:54:44 +0000
commite6acd87e7931ac95405d1ba026b3f9dacb66669f (patch)
treed339a8e19217fef5090845cb7340e308691a70b6
parent09b8bfee9796935adac368a8ecccdddaffeb9ff2 (diff)
downloadgdm-e6acd87e7931ac95405d1ba026b3f9dacb66669f.tar.gz
Set authdir to NULL after freeing to avoid accessing an invalid pointer.
2006-10-05 Brian Cameron <brian.cameron@sun.com> * daemon/auth.c: Set authdir to NULL after freeing to avoid accessing an invalid pointer. Fixes bug #359831. Patch provided by Amnon Aaronsohn <bla@cs.huji.ac.il>.
-rw-r--r--ChangeLog6
-rw-r--r--daemon/auth.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d8c1eb88..e671e10d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-05 Brian Cameron <brian.cameron@sun.com>
+
+ * daemon/auth.c: Set authdir to NULL after freeing to avoid accessing
+ an invalid pointer. Fixes bug #359831. Patch provided by
+ Amnon Aaronsohn <bla@cs.huji.ac.il>.
+
2006-10-04 Ariel Rios <ariel@gnu.org>
Fixes bug #345434.
diff --git a/daemon/auth.c b/daemon/auth.c
index f5fae30d..acf0f3fb 100644
--- a/daemon/auth.c
+++ b/daemon/auth.c
@@ -710,7 +710,9 @@ try_user_add_again:
af = gdm_safe_fopen_ap (d->userauth);
}
+ /* Set to NULL, because can goto try_user_add_again.
g_free (authdir);
+ authdir = NULL;
if G_UNLIKELY (af == NULL) {
/* Really no need to clean up here - this process is a goner anyway */