projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f2e132
)
activate: fix fd leak in do_accept()
author
Philippe De Swert
<philippedeswert@gmail.com>
Wed, 10 Sep 2014 19:14:41 +0000
(22:14 +0300)
committer
David Herrmann
<dh.herrmann@gmail.com>
Thu, 11 Sep 2014 15:47:37 +0000
(17:47 +0200)
Found with Coverity.
src/activate/activate.c
patch
|
blob
|
history
diff --git
a/src/activate/activate.c
b/src/activate/activate.c
index
8942773
..
0a1df37
100644
(file)
--- a/
src/activate/activate.c
+++ b/
src/activate/activate.c
@@
-242,7
+242,7
@@
static int launch1(const char* child, char** argv, char **env, int fd) {
static int do_accept(const char* name, char **argv, char **envp, int fd) {
_cleanup_free_ char *local = NULL, *peer = NULL;
-
int fd2
;
+
_cleanup_close_ int fd2 = -1
;
fd2 = accept(fd, NULL, NULL);
if (fd2 < 0) {