summaryrefslogtreecommitdiff
path: root/daemon
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 /daemon
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>.
Diffstat (limited to 'daemon')
-rw-r--r--daemon/auth.c2
1 files changed, 2 insertions, 0 deletions
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 */