mirror of
https://github.com/troglobit/finit.git
synced 2026-11-01 13:10:32 +00:00
Check return value from strtok(), may be NULL
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
a2177a8063
commit
da76cf4f75
1 file changed
+3
@@ -36,6 +36,9 @@ static void pidfile_callback(void *UNUSED(arg), int fd, int UNUSED(events))
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
basename = strtok(ev->name, ".");
|
basename = strtok(ev->name, ".");
|
||||||
|
if (!basename)
|
||||||
|
continue;
|
||||||
|
|
||||||
svc = svc_find_by_nameid(basename, 1);
|
svc = svc_find_by_nameid(basename, 1);
|
||||||
if (!svc)
|
if (!svc)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in new issue
Block a user