]> err.no Git - systemd/commitdiff
logind: fix bad memory access
authorLennart Poettering <lennart@poettering.net>
Mon, 27 Jun 2011 21:08:42 +0000 (23:08 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 27 Jun 2011 21:08:42 +0000 (23:08 +0200)
src/logind-dbus.c

index 050eb7160edde03b4a7b075208b2c53c5357ab57..9b199de20af052c17a1a5f6b6a7de08e9ea8bb00 100644 (file)
@@ -258,7 +258,7 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message, DBusMess
                 else if (vtnr != (uint32_t) v)
                         return -EINVAL;
 
-        } else if (!isempty(tty) && seat_is_vtconsole(s))
+        } else if (!isempty(tty) && s && seat_is_vtconsole(s))
                 return -EINVAL;
 
         if (s) {