diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-10-16 18:28:30 -0400 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-07-05 08:50:55 +0200 |
commit | 2aebec83237867717ad3ba0096a82670d82d911a (patch) | |
tree | d1f39278420f6f9d7d51a0e6a9d1dce1120ce9dc /src/login/logind-seat.c | |
parent | 9f751b60fbe45dfc9fb17c5ec6452b68e9e0a89a (diff) |
tree-wide: use mfree more
Diffstat (limited to 'src/login/logind-seat.c')
-rw-r--r-- | src/login/logind-seat.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index ae42811de..194ebc1b7 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -48,18 +48,15 @@ Seat *seat_new(Manager *m, const char *id) { return NULL; s->state_file = strappend("/run/systemd/seats/", id); - if (!s->state_file) { - free(s); - return NULL; - } + if (!s->state_file) + return mfree(s); s->id = basename(s->state_file); s->manager = m; if (hashmap_put(m->seats, s->id, s) < 0) { free(s->state_file); - free(s); - return NULL; + return mfree(s); } return s; |