mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
ctdb-tcp: Set file descriptor to -1 after close.
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>
This commit is contained in:
parent
ce451c7cc6
commit
0e73734822
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user