diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-05-25 00:58:55 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-06-21 19:29:44 +0200 |
commit | d2f92cdfd0189491387069da45734816effd8cbd (patch) | |
tree | 0b111941e299d73bebf9f916a32f545cc044d80b /src/logind-user.c | |
parent | 14c3baca3eb8b32fc266e46127851585bee5aff2 (diff) |
logind: unlink state files when stopping
Diffstat (limited to 'src/logind-user.c')
-rw-r--r-- | src/logind-user.c | 10 |
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; } |