Handle improbable case were dev may be NULL, found by Coverity

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2020-01-06 21:46:44 +01:00
1 parent 765ef63274
commit 41647a814c
1 file changed
+2 -1
+2 -1
View File
@@ -270,7 +270,8 @@ again:
/* Replace @console with actual device */
if (arg && !strcmp(arg, "@console"))
arg = dev;
entry->args[j++] = strdup(arg);
if (arg)
entry->args[j++] = strdup(arg);
}
entry->args[++j] = NULL;
}