mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +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> (cherry picked from commit 0e737348227252d2c0d1708be40753775a9b17ad)
This commit is contained in:
parent
33dd9020ef
commit
7b1204917b
@ -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…
x
Reference in New Issue
Block a user