1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

core: fix member access within null pointer

config_parse_tasks_max() is also used for parsing system.conf or
user.conf. In that case, userdata is NULL.

Fixes #10362.
This commit is contained in:
Yu Watanabe 2018-10-12 04:24:27 +09:00 committed by Lennart Poettering
parent 8e04444385
commit 958b8c7bd7

View File

@ -3093,7 +3093,7 @@ int config_parse_tasks_max(
int r;
if (isempty(rvalue)) {
*tasks_max = u->manager->default_tasks_max;
*tasks_max = u ? u->manager->default_tasks_max : UINT64_MAX;
return 0;
}