diff options
Diffstat (limited to 'src/core/cgroup.c')
-rw-r--r-- | src/core/cgroup.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 2b15310191..13e69e27b3 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -1170,7 +1170,7 @@ static void cgroup_apply_restrict_network_interfaces(Unit *u) { } static int cgroup_apply_devices(Unit *u) { - _cleanup_(bpf_program_unrefp) BPFProgram *prog = NULL; + _cleanup_(bpf_program_freep) BPFProgram *prog = NULL; const char *path; CGroupContext *c; CGroupDeviceAllow *a; @@ -1244,7 +1244,7 @@ static int cgroup_apply_devices(Unit *u) { policy = CGROUP_DEVICE_POLICY_STRICT; } - r = bpf_devices_apply_policy(prog, policy, any, path, &u->bpf_device_control_installed); + r = bpf_devices_apply_policy(&prog, policy, any, path, &u->bpf_device_control_installed); if (r < 0) { static bool warned = false; @@ -2767,7 +2767,7 @@ void unit_prune_cgroup(Unit *u) { u->cgroup_realized_mask = 0; u->cgroup_enabled_mask = 0; - u->bpf_device_control_installed = bpf_program_unref(u->bpf_device_control_installed); + u->bpf_device_control_installed = bpf_program_free(u->bpf_device_control_installed); } int unit_search_main_pid(Unit *u, pid_t *ret) { |