]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logind: don't hit assert when we try to free NULL manager object
authorLennart Poettering <lennart@poettering.net>
Thu, 20 Oct 2016 17:19:46 +0000 (19:19 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Oct 2016 18:22:43 +0000 (14:22 -0400)
Fixes: #4431
src/login/logind.c

index a9a06f5e28ba0a4cd987157b9e1ff1fe282d70cb..a9841a3832e69ef011fb27ea844f6182ac418847 100644 (file)
@@ -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);