mirror of
https://github.com/troglobit/finit.git
synced 2026-11-30 21:18:22 +00:00
Follow-up to 6a89e60, len may be used unitialized
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
340cae4afd
commit
0cae7d44dd
1 file changed
+2
-1
+2
-1
@@ -1632,7 +1632,7 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (type == SVC_TYPE_TTY) {
|
if (type == SVC_TYPE_TTY) {
|
||||||
size_t i, len = 0;
|
size_t i, len;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
|
||||||
if (tty_parse_args(&tty, cmd, &args))
|
if (tty_parse_args(&tty, cmd, &args))
|
||||||
@@ -1643,6 +1643,7 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file)
|
|||||||
else
|
else
|
||||||
dev = tty.dev;
|
dev = tty.dev;
|
||||||
next:
|
next:
|
||||||
|
len = 0;
|
||||||
if (tty.cmd)
|
if (tty.cmd)
|
||||||
len += strlen(tty.cmd);
|
len += strlen(tty.cmd);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user