]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
coverity: #1425816 2441/head
author2xsec <dh48.jeong@samsung.com>
Mon, 2 Jul 2018 11:37:36 +0000 (20:37 +0900)
committer2xsec <dh48.jeong@samsung.com>
Mon, 2 Jul 2018 11:37:36 +0000 (20:37 +0900)
Explicit null dereferenced

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

index 6804bec5433bb409a7ee37b7ef0e9ebda43f8d2b..c41e9f48fc4a036f0b731959e1636a910fcdb45c 100644 (file)
@@ -175,6 +175,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));