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
3bd21f4e
Unverified
Commit
3bd21f4e
authored
May 11, 2021
by
Stéphane Graber
Committed by
GitHub
May 11, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3837 from brauner/2021-05-10.fixes.cgroup
cgroups: clean up cgroup_ops on initialization error
parents
fb6991e5
e3d78fdc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
cgfsng.c
src/lxc/cgroups/cgfsng.c
+3
-3
cgroup.h
src/lxc/cgroups/cgroup.h
+1
-0
No files found.
src/lxc/cgroups/cgfsng.c
View file @
3bd21f4e
...
...
@@ -3342,14 +3342,14 @@ __cgfsng_ops static int cgfsng_data_init(struct cgroup_ops *ops)
struct
cgroup_ops
*
cgroup_ops_init
(
struct
lxc_conf
*
conf
)
{
__
do_free
struct
cgroup_ops
*
cgfsng_ops
=
NULL
;
__
cleanup_cgroup_ops
struct
cgroup_ops
*
cgfsng_ops
=
NULL
;
cgfsng_ops
=
zalloc
(
sizeof
(
struct
cgroup_ops
));
if
(
!
cgfsng_ops
)
return
ret_set_errno
(
NULL
,
ENOMEM
);
cgfsng_ops
->
cgroup_layout
=
CGROUP_LAYOUT_UNKNOWN
;
cgfsng_ops
->
dfd_mnt
=
-
EBADF
;
cgfsng_ops
->
cgroup_layout
=
CGROUP_LAYOUT_UNKNOWN
;
cgfsng_ops
->
dfd_mnt
=
-
EBADF
;
if
(
initialize_cgroups
(
cgfsng_ops
,
conf
))
return
NULL
;
...
...
src/lxc/cgroups/cgroup.h
View file @
3bd21f4e
...
...
@@ -280,6 +280,7 @@ __hidden extern struct cgroup_ops *cgroup_init(struct lxc_conf *conf);
__hidden
extern
void
cgroup_exit
(
struct
cgroup_ops
*
ops
);
define_cleanup_function
(
struct
cgroup_ops
*
,
cgroup_exit
);
#define __cleanup_cgroup_ops call_cleaner(cgroup_exit)
__hidden
extern
int
cgroup_attach
(
const
struct
lxc_conf
*
conf
,
const
char
*
name
,
const
char
*
lxcpath
,
pid_t
pid
);
...
...
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