summaryrefslogtreecommitdiff
path: root/src/logind-user.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-user.c
parent14c3baca3eb8b32fc266e46127851585bee5aff2 (diff)
logind: unlink state files when stopping
Diffstat (limited to 'src/logind-user.c')
-rw-r--r--src/logind-user.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/logind-user.c b/src/logind-user.c
index 19db746d8b..7d6df8db7a 100644
--- a/src/logind-user.c
+++ b/src/logind-user.c
@@ -82,12 +82,7 @@ void user_free(User *u) {
hashmap_remove(u->manager->users, ULONG_TO_PTR((unsigned long) u->uid));
free(u->name);
-
- if (u->state_file) {
- unlink(u->state_file);
- free(u->state_file);
- }
-
+ free(u->state_file);
free(u);
}
@@ -385,6 +380,9 @@ int user_stop(User *u) {
if (k < 0)
r = k;
+ unlink(u->state_file);
+ user_add_to_gc_queue(u);
+
return r;
}