]> 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)
committerStéphane Graber <stgraber@ubuntu.com>
Sun, 24 Sep 2017 04:39:45 +0000 (00:39 -0400)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/tests/concurrent.c

index bfefa48094e2dff65b9fe20fdb05df4912103b1c..20b5dc6256df64a25cb9bb3faf6210100d88dc86 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: /* '?' */