chiark / gitweb /
getty-generator: fix segfault when $container_ttys is not set
authorLennart Poettering <lennart@poettering.net>
Fri, 13 Dec 2013 19:36:02 +0000 (20:36 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 13 Dec 2013 19:40:31 +0000 (20:40 +0100)
src/getty-generator/getty-generator.c

index 36a9369..feb5815 100644 (file)
@@ -130,7 +130,7 @@ int main(int argc, char *argv[]) {
                  * the variable name we only support ptys here. */
 
                 r = getenv_for_pid(1, "container_ttys", &container_ttys);
-                if (r >= 0) {
+                if (r > 0) {
                         char *w, *state;
                         size_t l;