summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-10-20 19:19:46 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-10-20 14:22:43 -0400
commit84a4e6608dbda38c724ab196a226db209a50b224 (patch)
tree13d0c3a653d7e0f5f1f6871110f3f2b4bea13560 /src/login
parentb5bdbcd5ba2c0279ada3fce31ff9f631361831c5 (diff)
logind: don't hit assert when we try to free NULL manager object
Fixes: #4431
Diffstat (limited to 'src/login')
-rw-r--r--src/login/logind.c3
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);