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
61e9751f
Unverified
Commit
61e9751f
authored
Mar 09, 2020
by
Christian Brauner
Committed by
GitHub
Mar 09, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3280 from Piscolero/state_client_socket_leak_fix
commands_utils: fix socket leak when adding state client
parents
d31059ef
ebbca852
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
commands.c
src/lxc/commands.c
+5
-1
compiler.h
src/lxc/compiler.h
+3
-0
No files found.
src/lxc/commands.c
View file @
61e9751f
...
...
@@ -863,7 +863,7 @@ int lxc_cmd_add_state_client(const char *name, const char *lxcpath,
return
MAX_STATE
;
}
static
int
lxc_cmd_add_state_client_callback
(
int
fd
,
struct
lxc_cmd_req
*
req
,
static
int
lxc_cmd_add_state_client_callback
(
__owns
int
fd
,
struct
lxc_cmd_req
*
req
,
struct
lxc_handler
*
handler
,
struct
lxc_epoll_descr
*
descr
)
{
...
...
@@ -889,6 +889,10 @@ static int lxc_cmd_add_state_client_callback(int fd, struct lxc_cmd_req *req,
if
(
ret
<
0
)
goto
reap_client_fd
;
/* close fd if state is already achieved to avoid leakage */
if
(
rsp
.
ret
!=
MAX_STATE
)
close
(
fd
);
return
0
;
reap_client_fd:
...
...
src/lxc/compiler.h
View file @
61e9751f
...
...
@@ -52,6 +52,9 @@
#define __lxc_unused
#endif
/* Indicates taking ownership */
#define __owns
#define __cgfsng_ops
#endif
/* __LXC_COMPILER_H */
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