summaryrefslogtreecommitdiff
path: root/source4/libcli/raw/clitransport.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-27 08:41:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:21 -0500
commitaa12305945df5f1578250b56ae2f3653b051736f (patch)
tree30e072fca46873f0d59d736d65b96096326eec2a /source4/libcli/raw/clitransport.c
parent3aa3428bc93e6c8741b52eaa65d43f3a5abcee2e (diff)
downloadsamba-aa12305945df5f1578250b56ae2f3653b051736f.tar.gz
samba-aa12305945df5f1578250b56ae2f3653b051736f.tar.bz2
samba-aa12305945df5f1578250b56ae2f3653b051736f.zip
r2680: switched the libcli/raw/ code over to use talloc_reference(), which simplifies things quite a bit
(This used to be commit c82a9cf750829c4f6982ca3133295c8599023c4e)
Diffstat (limited to 'source4/libcli/raw/clitransport.c')
-rw-r--r--source4/libcli/raw/clitransport.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index eb1d3631ee..f06f2c57ff 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -52,7 +52,6 @@ static int transport_destructor(void *ptr)
event_remove_fd(transport->event.ctx, transport->event.fde);
event_remove_timed(transport->event.ctx, transport->event.te);
event_context_destroy(transport->event.ctx);
- talloc_free(transport->socket);
return 0;
}
@@ -75,7 +74,7 @@ struct smbcli_transport *smbcli_transport_init(struct smbcli_socket *sock)
return NULL;
}
- transport->socket = sock;
+ transport->socket = talloc_reference(transport, sock);
transport->negotiate.protocol = PROTOCOL_NT1;
transport->options.use_spnego = lp_use_spnego();
transport->negotiate.max_xmit = ~0;