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
2c5cd61e
Unverified
Commit
2c5cd61e
authored
Dec 08, 2020
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
confile: cleanup set_config_apparmor_raw()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
dc1d08c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
confile.c
src/lxc/confile.c
+8
-12
No files found.
src/lxc/confile.c
View file @
2c5cd61e
...
@@ -1423,26 +1423,22 @@ static int set_config_apparmor_raw(const char *key,
...
@@ -1423,26 +1423,22 @@ static int set_config_apparmor_raw(const char *key,
struct
lxc_conf
*
lxc_conf
,
struct
lxc_conf
*
lxc_conf
,
void
*
data
)
void
*
data
)
{
{
char
*
elem
;
__do_free
char
*
elem
=
NULL
;
struct
lxc_list
*
list
;
__do_free
struct
lxc_list
*
list
=
NULL
;
if
(
lxc_config_value_empty
(
value
))
if
(
lxc_config_value_empty
(
value
))
return
lxc_clear_apparmor_raw
(
lxc_conf
);
return
lxc_clear_apparmor_raw
(
lxc_conf
);
list
=
malloc
(
sizeof
(
*
list
));
list
=
malloc
(
sizeof
(
*
list
));
if
(
!
list
)
{
if
(
!
list
)
errno
=
ENOMEM
;
return
ret_errno
(
ENOMEM
);
return
-
1
;
}
elem
=
strdup
(
value
);
elem
=
strdup
(
value
);
if
(
!
elem
)
{
if
(
!
elem
)
free
(
list
);
return
ret_errno
(
ENOMEM
);
return
-
1
;
}
list
->
elem
=
elem
;
lxc_list_add_tail
(
&
lxc_conf
->
lsm_aa_raw
,
list
);
list
->
elem
=
move_ptr
(
elem
);
lxc_list_add_tail
(
&
lxc_conf
->
lsm_aa_raw
,
move_ptr
(
list
));
return
0
;
return
0
;
}
}
...
...
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