mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 16:37:19 +09:00
core/execute-serialize: FOREACH_ARRAY at one more place
This commit is contained in:
@@ -373,8 +373,7 @@ static int exec_cgroup_context_serialize(const CGroupContext *c, FILE *f) {
|
||||
if (il->limits[type] == cgroup_io_limit_defaults[type])
|
||||
continue;
|
||||
|
||||
key = strjoin("exec-cgroup-context-io-device-limit-",
|
||||
cgroup_io_limit_type_to_string(type));
|
||||
key = strjoin("exec-cgroup-context-io-device-limit-", cgroup_io_limit_type_to_string(type));
|
||||
if (!key)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -1479,8 +1478,8 @@ static int exec_parameters_deserialize(ExecParameters *p, FILE *f, FDSet *fds) {
|
||||
return log_oom_debug();
|
||||
|
||||
/* Ensure we don't leave any FD uninitialized on error, it makes the fuzzer sad */
|
||||
for (size_t i = 0; i < p->n_socket_fds + p->n_storage_fds; ++i)
|
||||
p->fds[i] = -EBADF;
|
||||
FOREACH_ARRAY(i, p->fds, p->n_socket_fds + p->n_storage_fds)
|
||||
*i = -EBADF;
|
||||
|
||||
r = deserialize_fd_many(fds, val, p->n_socket_fds + p->n_storage_fds, p->fds);
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user