[gdm] Fix .xsession-errors.old
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] Fix .xsession-errors.old
- Date: Thu, 15 Mar 2012 23:03:33 +0000 (UTC)
commit cdccccfe80578b801121fa66870239d9fcd7390a
Author: Edward Sheldrake <ejsheldrake gmail com>
Date: Tue Oct 4 20:49:19 2011 +0100
Fix .xsession-errors.old
Fix moving previous ~/.xsession-errors file to ~/.xsession-errors.old
at login, by fixing use after free of "home_dir" variable.
https://bugzilla.gnome.org/show_bug.cgi?id=660921
daemon/gdm-session-worker.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 45a06ce..578f694 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -1872,7 +1872,6 @@ gdm_session_worker_start_session (GdmSessionWorker *worker,
if ((home_dir == NULL) || g_chdir (home_dir) < 0) {
g_chdir ("/");
}
- g_free (home_dir);
fd = open ("/dev/null", O_RDWR);
dup2 (fd, STDIN_FILENO);
@@ -1883,6 +1882,7 @@ gdm_session_worker_start_session (GdmSessionWorker *worker,
} else {
fd = _open_user_session_log (home_dir);
}
+ g_free (home_dir);
dup2 (fd, STDOUT_FILENO);
dup2 (fd, STDERR_FILENO);
close (fd);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]