]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
coverity: #1425816
author2xsec <dh48.jeong@samsung.com>
Mon, 2 Jul 2018 11:37:36 +0000 (20:37 +0900)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 10 Dec 2018 13:41:36 +0000 (14:41 +0100)
Explicit null dereferenced

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
src/tests/concurrent.c

index 20b5dc6256df64a25cb9bb3faf6210100d88dc86..daebd17c0e38b9359a688cf9c2c734c12994b4bd 100644 (file)
@@ -177,6 +177,9 @@ int main(int argc, char *argv[]) {
         case 'm': {
             char *mode_tok, *tok, *saveptr = NULL;
 
+           if (!optarg)
+                continue;
+
             modes = NULL;
             for (i = 0, mode_tok = optarg;
                  (tok = strtok_r(mode_tok, ",", &saveptr));