git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce451c7
)
ctdb-tcp: Set file descriptor to -1 after close.
author
Martin Schwenke
<martin@meltin.net>
Sun, 14 Aug 2016 23:43:46 +0000
(09:43 +1000)
committer
Martin Schwenke
<martins@samba.org>
Wed, 17 Aug 2016 21:00:25 +0000
(23:00 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12157
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tcp/tcp_connect.c
patch
|
blob
|
history
diff --git
a/ctdb/tcp/tcp_connect.c
b/ctdb/tcp/tcp_connect.c
index 2aad8c20f0083db6b79fb714ae057dadf54c5be1..91da9e49210079dd911327594c624fcb26bb41cd 100644
(file)
--- a/
ctdb/tcp/tcp_connect.c
+++ b/
ctdb/tcp/tcp_connect.c
@@
-194,6
+194,7
@@
void ctdb_tcp_node_connect(struct tevent_context *ev, struct tevent_timer *te,
DEBUG(DEBUG_ERR, (__location__ " unknown family %u\n",
sock_in.sa.sa_family));
close(tnode->fd);
+ tnode->fd = -1;
return;
}
@@
-201,6
+202,7
@@
void ctdb_tcp_node_connect(struct tevent_context *ev, struct tevent_timer *te,
DEBUG(DEBUG_ERR, (__location__ " Failed to bind socket %s(%d)\n",
strerror(errno), errno));
close(tnode->fd);
+ tnode->fd = -1;
return;
}