diff options
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; } |