From 6f40637ca8b6c2a54551b711dfd34f24b3295a53 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 30 Jul 2009 08:42:42 +0200 Subject: [PATCH] s4:tls: avoid using talloc_reference() in tls_init_client() metze --- source4/lib/tls/tls.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/source4/lib/tls/tls.c b/source4/lib/tls/tls.c index b87bd2c307d..d4e8680a6bf 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(); -- 2.11.4.GIT