Merge pull request #31367 from yuwata/cgroup-runtime-fix

core/cgroup: several follow-up about CGroupRuntime
This commit is contained in:
Luca Boccassi
2024-02-17 10:24:06 +00:00
committed by GitHub
2 changed files with 1 additions and 4 deletions
-3
View File
@@ -5266,9 +5266,6 @@ CGroupRuntime *cgroup_runtime_free(CGroupRuntime *crt) {
set_free(crt->ip_bpf_custom_egress);
set_free(crt->ip_bpf_custom_egress_installed);
fdset_free(crt->initial_socket_bind_link_fds);
fdset_free(crt->initial_restric_ifaces_link_fds);
free(crt->cgroup_path);
return mfree(crt);
+1 -1
View File
@@ -5813,7 +5813,7 @@ int unit_prepare_exec(Unit *u) {
(void) unit_realize_cgroup(u);
CGroupRuntime *crt = unit_get_cgroup_runtime(u);
if (crt->reset_accounting) {
if (crt && crt->reset_accounting) {
(void) unit_reset_accounting(u);
crt->reset_accounting = false;
}