summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2006-10-06 00:56:45 +0000
committerBrian Cameron <bcameron@src.gnome.org>2006-10-06 00:56:45 +0000
commit6bfca48299f1f5c70b9acf5578b998d4fbc478c3 (patch)
tree4181ec61271f537e505b8b062f4ae21f2e83ddfa
parent7ec941263725025eb2fcbab1f94025918063eeaf (diff)
downloadgdm-6bfca48299f1f5c70b9acf5578b998d4fbc478c3.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 78815226..fa085526 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-08-03 Ray Strode <rstrode@redhat.com>
* configure.ac: look for /usr/bin/Xorg when searching or
diff --git a/daemon/auth.c b/daemon/auth.c
index c8086b2b..a3977cdf 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 */