]> 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>
Wed, 4 Oct 2017 23:11:25 +0000 (19:11 -0400)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/tests/concurrent.c

index e6899adc5012e85260127cb3b4a4822fd3c23632..08bb7700eb56bdcb5fcaf79ae4af06d8ab57eea5 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: /* '?' */