projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ceph plugin: close fd on error
[collectd.git]
/
src
/
ceph.c
diff --git
a/src/ceph.c
b/src/ceph.c
index
419ca6e
..
c0df375
100644
(file)
--- a/
src/ceph.c
+++ b/
src/ceph.c
@@
-1082,6
+1082,7
@@
static int cconn_connect(struct cconn *io)
{
ERROR("ceph plugin: cconn_connect: connect(%d) failed: error %d",
fd, err);
+ close(fd);
return err;
}
@@
-1091,6
+1092,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;