[lxc-devel] [lxc/master] coverity: #1425816
2xsec on Github
lxc-bot at linuxcontainers.org
Mon Jul 2 11:41:26 UTC 2018
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 548 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180702/350f57be/attachment.bin>
-------------- next part --------------
From f766a9d22b3d7a847b5bc400d9d87247782001fb Mon Sep 17 00:00:00 2001
From: 2xsec <dh48.jeong at samsung.com>
Date: Mon, 2 Jul 2018 20:37:36 +0900
Subject: [PATCH] coverity: #1425816
Explicit null dereferenced
Signed-off-by: 2xsec <dh48.jeong at samsung.com>
---
src/tests/concurrent.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/tests/concurrent.c b/src/tests/concurrent.c
index 6804bec54..c41e9f48f 100644
--- a/src/tests/concurrent.c
+++ b/src/tests/concurrent.c
@@ -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));
More information about the lxc-devel
mailing list