]> git.ipfire.org Git - thirdparty/systemd.git/commit
logind: rework Seat/Session/User object allocation and freeing a bit
authorLennart Poettering <lennart@poettering.net>
Fri, 3 Aug 2018 16:53:09 +0000 (18:53 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 13 Oct 2018 10:59:29 +0000 (12:59 +0200)
commit8c29a4570993105fecc12288596d2ee77c7f82b8
tree9b3b515812f3949e6a95b6cdaaabcc3ac037da49
parentfd8879498d50b19c5abd0a90daa8f87be6ff6e9f
logind: rework Seat/Session/User object allocation and freeing a bit

Let's update things a bit to follow current practices:

- User structure initialization rather than zero-initialized allocation

- Always propagate proper errors from allocation functions

- Use _cleanup_ for freeing objects when allocation fails half-way

- Make destructors return NULL
src/login/logind-core.c
src/login/logind-seat.c
src/login/logind-seat.h
src/login/logind-session.c
src/login/logind-session.h
src/login/logind-user.c