]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tests: avoid NULL pointer dereference
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 10 Sep 2017 06:09:05 +0000 (08:09 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 10 Sep 2017 21:51:57 +0000 (23:51 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/tests/concurrent.c

index af63c6a073f929f535f5fc56f3f5c0dbe35b8c35..bcad8e52ec33d85c160c445c1308e6d6f319da4f 100644 (file)
@@ -188,7 +188,8 @@ int main(int argc, char *argv[]) {
                 }
                 modes[i] = tok;
             }
-            modes[i] = NULL;
+           if (modes)
+                   modes[i] = NULL;
             break;
         }
         default: /* '?' */