Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
2b525963
Unverified
Commit
2b525963
authored
Feb 01, 2021
by
Stéphane Graber
Committed by
GitHub
Feb 01, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3643 from brauner/2021-02-01/fixes_2
cgroups: remove pointless NULL checks
parents
326bb02c
ed75d76e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
cgfsng.c
src/lxc/cgroups/cgfsng.c
+5
-5
No files found.
src/lxc/cgroups/cgfsng.c
View file @
2b525963
...
@@ -1008,7 +1008,7 @@ __cgfsng_ops static void cgfsng_payload_destroy(struct cgroup_ops *ops,
...
@@ -1008,7 +1008,7 @@ __cgfsng_ops static void cgfsng_payload_destroy(struct cgroup_ops *ops,
WARN
(
"Failed to detach bpf program from cgroup"
);
WARN
(
"Failed to detach bpf program from cgroup"
);
#endif
#endif
if
(
handler
->
conf
&&
!
lxc_list_empty
(
&
handler
->
conf
->
id_map
))
{
if
(
!
lxc_list_empty
(
&
handler
->
conf
->
id_map
))
{
struct
generic_userns_exec_data
wrap
=
{
struct
generic_userns_exec_data
wrap
=
{
.
conf
=
handler
->
conf
,
.
conf
=
handler
->
conf
,
.
container_cgroup
=
ops
->
container_cgroup
,
.
container_cgroup
=
ops
->
container_cgroup
,
...
@@ -1069,13 +1069,13 @@ __cgfsng_ops static void cgfsng_monitor_destroy(struct cgroup_ops *ops,
...
@@ -1069,13 +1069,13 @@ __cgfsng_ops static void cgfsng_monitor_destroy(struct cgroup_ops *ops,
goto
try_lxc_rm_rf
;
goto
try_lxc_rm_rf
;
}
}
if
(
conf
&&
conf
->
cgroup_meta
.
monitor_pivot_dir
)
if
(
conf
->
cgroup_meta
.
monitor_pivot_dir
)
pivot_path
=
must_make_path
(
h
->
mountpoint
,
h
->
container_base_path
,
pivot_path
=
must_make_path
(
h
->
mountpoint
,
h
->
container_base_path
,
conf
->
cgroup_meta
.
monitor_pivot_dir
,
CGROUP_PIVOT
,
NULL
);
conf
->
cgroup_meta
.
monitor_pivot_dir
,
CGROUP_PIVOT
,
NULL
);
else
if
(
conf
&&
conf
->
cgroup_meta
.
monitor_dir
)
else
if
(
conf
->
cgroup_meta
.
monitor_dir
)
pivot_path
=
must_make_path
(
h
->
mountpoint
,
h
->
container_base_path
,
pivot_path
=
must_make_path
(
h
->
mountpoint
,
h
->
container_base_path
,
conf
->
cgroup_meta
.
monitor_dir
,
CGROUP_PIVOT
,
NULL
);
conf
->
cgroup_meta
.
monitor_dir
,
CGROUP_PIVOT
,
NULL
);
else
if
(
conf
&&
conf
->
cgroup_meta
.
dir
)
else
if
(
conf
->
cgroup_meta
.
dir
)
pivot_path
=
must_make_path
(
h
->
mountpoint
,
h
->
container_base_path
,
pivot_path
=
must_make_path
(
h
->
mountpoint
,
h
->
container_base_path
,
conf
->
cgroup_meta
.
dir
,
CGROUP_PIVOT
,
NULL
);
conf
->
cgroup_meta
.
dir
,
CGROUP_PIVOT
,
NULL
);
else
else
...
@@ -3337,7 +3337,7 @@ static int cg_unified_init(struct cgroup_ops *ops, bool relative,
...
@@ -3337,7 +3337,7 @@ static int cg_unified_init(struct cgroup_ops *ops, bool relative,
{
{
__do_close
int
cgroup_root_fd
=
-
EBADF
;
__do_close
int
cgroup_root_fd
=
-
EBADF
;
__do_free
char
*
base_cgroup
=
NULL
,
*
controllers_path
=
NULL
;
__do_free
char
*
base_cgroup
=
NULL
,
*
controllers_path
=
NULL
;
__do_free_string_list
char
**
delegatable
;
__do_free_string_list
char
**
delegatable
=
NULL
;
__do_free
struct
hierarchy
*
new
=
NULL
;
__do_free
struct
hierarchy
*
new
=
NULL
;
int
ret
;
int
ret
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment