summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-07-30 08:42:42 +0200
committerStefan Metzmacher <metze@samba.org>2009-07-31 14:42:04 +0200
commit6f40637ca8b6c2a54551b711dfd34f24b3295a53 (patch)
treeafc34e9886ea6c2e7308473ed9e737d6d99dff5b /source4
parentd866497b187f4c9c4fd7771b85ca1441b694af09 (diff)
downloadsamba-6f40637ca8b6c2a54551b711dfd34f24b3295a53.tar.gz
samba-6f40637ca8b6c2a54551b711dfd34f24b3295a53.tar.bz2
samba-6f40637ca8b6c2a54551b711dfd34f24b3295a53.zip
s4:tls: avoid using talloc_reference() in tls_init_client()
metze
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/tls/tls.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/source4/lib/tls/tls.c b/source4/lib/tls/tls.c
index b87bd2c307..d4e8680a6b 100644
--- a/source4/lib/tls/tls.c
+++ b/source4/lib/tls/tls.c
@@ -554,13 +554,9 @@ struct socket_context *tls_init_client(struct socket_context *socket_ctx,
if (tls == NULL) return NULL;
tls->socket = socket_ctx;
+ talloc_steal(tls, socket_ctx);
tls->fde = fde;
- if (talloc_reference(tls, fde) == NULL) {
- return NULL;
- }
- if (talloc_reference(tls, socket_ctx) == NULL) {
- return NULL;
- }
+
new_sock->private_data = tls;
gnutls_global_init();