summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/raw/clisocket.c8
-rw-r--r--source4/libcli/raw/clitransport.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/source4/libcli/raw/clisocket.c b/source4/libcli/raw/clisocket.c
index be25b36007..40d9d2784a 100644
--- a/source4/libcli/raw/clisocket.c
+++ b/source4/libcli/raw/clisocket.c
@@ -179,10 +179,10 @@ NTSTATUS smbcli_sock_connect(TALLOC_CTX *mem_ctx,
****************************************************************************/
void smbcli_sock_dead(struct smbcli_socket *sock)
{
- if (sock->sock != NULL) {
- talloc_free(sock->sock);
- sock->sock = NULL;
- }
+ talloc_free(sock->event.fde);
+ sock->event.fde = NULL;
+ talloc_free(sock->sock);
+ sock->sock = NULL;
}
/****************************************************************************
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index 1cd0a3046e..a0efe7042c 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -115,7 +115,7 @@ struct smbcli_transport *smbcli_transport_init(struct smbcli_socket *sock,
handles events up until we are connected */
talloc_free(transport->socket->event.fde);
transport->socket->event.fde = event_add_fd(transport->socket->event.ctx,
- transport->socket,
+ transport->socket->sock,
socket_get_fd(transport->socket->sock),
EVENT_FD_READ,
smbcli_transport_event_handler,