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
a0a2c1a1
Unverified
Commit
a0a2c1a1
authored
Aug 06, 2018
by
2xsec
Committed by
Christian Brauner
Aug 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coverity: #1438233
Resource leak Signed-off-by:
2xsec
<
dh48.jeong@samsung.com
>
parent
1c98a6e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
pam_cgfs.c
src/lxc/pam/pam_cgfs.c
+6
-1
No files found.
src/lxc/pam/pam_cgfs.c
View file @
a0a2c1a1
...
...
@@ -1295,6 +1295,7 @@ static bool cgv2_init(uid_t uid, gid_t gid)
*/
goto
cleanup
;
}
cg_systemd_prune_init_scope
(
init_cgroup
);
/* Check if the v2 hierarchy is mounted at its standard location.
...
...
@@ -1329,6 +1330,7 @@ static bool cgv2_init(uid_t uid, gid_t gid)
while
(
getline
(
&
line
,
&
len
,
f
)
!=
-
1
)
{
char
*
user_slice
;
bool
has_user_slice
=
false
;
if
(
!
is_cgv2
(
line
))
continue
;
...
...
@@ -1342,6 +1344,7 @@ static bool cgv2_init(uid_t uid, gid_t gid)
free
(
user_slice
);
cgv2_add_controller
(
NULL
,
mountpoint
,
current_cgroup
,
init_cgroup
,
has_user_slice
);
/* Although the unified hierarchy can be mounted multiple times,
* each of those mountpoints will expose identical information.
* So let the first mountpoint we find, win.
...
...
@@ -1359,8 +1362,10 @@ cleanup:
fclose
(
f
);
free
(
line
);
if
(
!
ret
)
if
(
!
ret
)
{
free
(
init_cgroup
);
free
(
current_cgroup
);
}
return
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