projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f89012e
)
ceph plugin: close fd on error
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 28 Nov 2015 19:07:03 +0000
(20:07 +0100)
committer
Marc Fournier
<marc.fournier@camptocamp.com>
Mon, 30 Nov 2015 21:56:04 +0000
(22:56 +0100)
src/ceph.c
patch
|
blob
|
history
diff --git
a/src/ceph.c
b/src/ceph.c
index
f48e056
..
3ce9c88
100644
(file)
--- a/
src/ceph.c
+++ b/
src/ceph.c
@@
-1085,6
+1085,7
@@
static int cconn_connect(struct cconn *io)
{
ERROR("ceph plugin: cconn_connect: connect(%d) failed: error %d",
fd, err);
+ close(fd);
return err;
}
@@
-1094,6
+1095,7
@@
static int cconn_connect(struct cconn *io)
err = -errno;
ERROR("ceph plugin: cconn_connect: fcntl(%d, O_NONBLOCK) error %d",
fd, err);
+ close(fd);
return err;
}
io->asok = fd;