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
ca52b7ff
Unverified
Commit
ca52b7ff
authored
Apr 13, 2021
by
Christian Brauner
Committed by
GitHub
Apr 13, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3781 from evverx/lxcpath-memleak
tests: fix a memory leak in lxcpath
parents
274615f9
4cd72b69
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
lxcpath.c
src/tests/lxcpath.c
+6
-1
No files found.
src/tests/lxcpath.c
View file @
ca52b7ff
...
...
@@ -27,6 +27,8 @@
#include <string.h>
#include <errno.h>
#include "memory_utils.h"
#define MYNAME "lxctest1"
#define TSTERR(x) do { \
...
...
@@ -36,7 +38,8 @@
int
main
(
int
argc
,
char
*
argv
[])
{
struct
lxc_container
*
c
;
const
char
*
p1
,
*
p2
;
const
char
*
p1
;
__do_free
char
*
p2
=
NULL
;
int
retval
=
-
1
;
c
=
lxc_container_new
(
MYNAME
,
NULL
);
...
...
@@ -60,6 +63,7 @@ int main(int argc, char *argv[])
}
p1
=
c
->
get_config_path
(
c
);
free
(
p2
);
p2
=
c
->
config_file_name
(
c
);
if
(
strcmp
(
p1
,
CPATH
)
||
strcmp
(
p2
,
FPATH
))
{
TSTERR
(
"Bad result for path names after set_config_path()"
);
...
...
@@ -74,6 +78,7 @@ int main(int argc, char *argv[])
}
p1
=
c
->
get_config_path
(
c
);
free
(
p2
);
p2
=
c
->
config_file_name
(
c
);
if
(
strcmp
(
p1
,
CPATH
)
||
strcmp
(
p2
,
FPATH
))
{
TSTERR
(
"Bad result for path names after create with custom path"
);
...
...
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