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
c121b300
Unverified
Commit
c121b300
authored
Jun 27, 2019
by
Christian Brauner
Committed by
GitHub
Jun 27, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3063 from lifeng68/fix_memory_leak
cgfsng: fix memory leak in lxc_cpumask_to_cpulist
parents
daf6a727
24cac6af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
cgfsng.c
src/lxc/cgroups/cgfsng.c
+5
-1
No files found.
src/lxc/cgroups/cgfsng.c
View file @
c121b300
...
@@ -320,6 +320,7 @@ static char *lxc_cpumask_to_cpulist(uint32_t *bitarr, size_t nbits)
...
@@ -320,6 +320,7 @@ static char *lxc_cpumask_to_cpulist(uint32_t *bitarr, size_t nbits)
{
{
int
ret
;
int
ret
;
size_t
i
;
size_t
i
;
char
*
tmp
=
NULL
;
char
**
cpulist
=
NULL
;
char
**
cpulist
=
NULL
;
char
numstr
[
INTTYPE_TO_STRLEN
(
size_t
)]
=
{
0
};
char
numstr
[
INTTYPE_TO_STRLEN
(
size_t
)]
=
{
0
};
...
@@ -343,7 +344,10 @@ static char *lxc_cpumask_to_cpulist(uint32_t *bitarr, size_t nbits)
...
@@ -343,7 +344,10 @@ static char *lxc_cpumask_to_cpulist(uint32_t *bitarr, size_t nbits)
if
(
!
cpulist
)
if
(
!
cpulist
)
return
NULL
;
return
NULL
;
return
lxc_string_join
(
","
,
(
const
char
**
)
cpulist
,
false
);
tmp
=
lxc_string_join
(
","
,
(
const
char
**
)
cpulist
,
false
);
lxc_free_array
((
void
**
)
cpulist
,
free
);
return
tmp
;
}
}
static
ssize_t
get_max_cpus
(
char
*
cpulist
)
static
ssize_t
get_max_cpus
(
char
*
cpulist
)
...
...
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