mirror of
https://github.com/troglobit/finit.git
synced 2026-10-12 10:12:32 +00:00
initctl: fix cond segfault, regression introduced in e2f6ac0
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -343,6 +343,9 @@ static int do_cond(char *cmd)
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
if (!cmd)
|
||||
goto fallback;
|
||||
|
||||
arg = strpbrk(cmd, " \0");
|
||||
if (arg)
|
||||
*arg++ = 0;
|
||||
@@ -352,6 +355,7 @@ static int do_cond(char *cmd)
|
||||
return command[c].cb(arg);
|
||||
}
|
||||
|
||||
fallback:
|
||||
return do_cond_show(NULL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user