summaryrefslogtreecommitdiff
path: root/src/logind-session.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-05-25 00:58:55 +0200
committerLennart Poettering <lennart@poettering.net>2011-06-21 19:29:44 +0200
commitd2f92cdfd0189491387069da45734816effd8cbd (patch)
tree0b111941e299d73bebf9f916a32f545cc044d80b /src/logind-session.c
parent14c3baca3eb8b32fc266e46127851585bee5aff2 (diff)
logind: unlink state files when stopping
Diffstat (limited to 'src/logind-session.c')
-rw-r--r--src/logind-session.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/logind-session.c b/src/logind-session.c
index 566323d1e6..8f1280dbdc 100644
--- a/src/logind-session.c
+++ b/src/logind-session.c
@@ -86,11 +86,7 @@ void session_free(Session *s) {
hashmap_remove(s->manager->sessions, s->id);
- if (s->state_file) {
- unlink(s->state_file);
- free(s->state_file);
- }
-
+ free(s->state_file);
free(s);
}
@@ -445,7 +441,8 @@ int session_stop(Session *s) {
/* Remove X11 symlink */
session_unlink_x11_socket(s);
- session_save(s);
+ unlink(s->state_file);
+ session_add_to_gc_queue(s);
return r;
}