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
b02dc0d9
Unverified
Commit
b02dc0d9
authored
Feb 19, 2019
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands_utils: auto close lxc_cmd_sock_get_state
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
1edf8fa4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
commands_utils.c
src/lxc/commands_utils.c
+2
-4
No files found.
src/lxc/commands_utils.c
View file @
b02dc0d9
...
@@ -82,8 +82,8 @@ int lxc_cmd_sock_rcv_state(int state_client_fd, int timeout)
...
@@ -82,8 +82,8 @@ int lxc_cmd_sock_rcv_state(int state_client_fd, int timeout)
int
lxc_cmd_sock_get_state
(
const
char
*
name
,
const
char
*
lxcpath
,
int
lxc_cmd_sock_get_state
(
const
char
*
name
,
const
char
*
lxcpath
,
lxc_state_t
states
[
MAX_STATE
],
int
timeout
)
lxc_state_t
states
[
MAX_STATE
],
int
timeout
)
{
{
__do_close_prot_errno
int
state_client_fd
=
-
EBADF
;
int
ret
;
int
ret
;
int
state_client_fd
;
ret
=
lxc_cmd_add_state_client
(
name
,
lxcpath
,
states
,
&
state_client_fd
);
ret
=
lxc_cmd_add_state_client
(
name
,
lxcpath
,
states
,
&
state_client_fd
);
if
(
ret
<
0
)
if
(
ret
<
0
)
...
@@ -92,9 +92,7 @@ int lxc_cmd_sock_get_state(const char *name, const char *lxcpath,
...
@@ -92,9 +92,7 @@ int lxc_cmd_sock_get_state(const char *name, const char *lxcpath,
if
(
ret
<
MAX_STATE
)
if
(
ret
<
MAX_STATE
)
return
ret
;
return
ret
;
ret
=
lxc_cmd_sock_rcv_state
(
state_client_fd
,
timeout
);
return
lxc_cmd_sock_rcv_state
(
state_client_fd
,
timeout
);
close
(
state_client_fd
);
return
ret
;
}
}
int
lxc_make_abstract_socket_name
(
char
*
path
,
size_t
pathlen
,
int
lxc_make_abstract_socket_name
(
char
*
path
,
size_t
pathlen
,
...
...
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