diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-10-20 19:19:46 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-10-20 14:22:43 -0400 |
commit | 84a4e6608dbda38c724ab196a226db209a50b224 (patch) | |
tree | 13d0c3a653d7e0f5f1f6871110f3f2b4bea13560 /src | |
parent | b5bdbcd5ba2c0279ada3fce31ff9f631361831c5 (diff) |
logind: don't hit assert when we try to free NULL manager object
Fixes: #4431
Diffstat (limited to 'src')
-rw-r--r-- | src/login/logind.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/login/logind.c b/src/login/logind.c index a9a06f5e28..a9841a3832 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -126,7 +126,8 @@ static void manager_free(Manager *m) { Inhibitor *i; Button *b; - assert(m); + if (!m) + return; while ((session = hashmap_first(m->sessions))) session_free(session); |