s4:tls: avoid using talloc_reference() in tls_init_server()
authorStefan Metzmacher <metze@samba.org>
Thu, 30 Jul 2009 06:40:29 +0000 (08:40 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 31 Jul 2009 12:42:03 +0000 (14:42 +0200)
metze

source4/lib/tls/tls.c

index 8a5ee89b87f56646b9038326931392677bf0bbc0..b87bd2c307d94e780144b88ad777a4217258d6a5 100644 (file)
@@ -482,15 +482,8 @@ struct socket_context *tls_init_server(struct tls_params *params,
        }
 
        tls->socket          = socket_ctx;
+       talloc_steal(tls, socket_ctx);
        tls->fde             = fde;
-       if (talloc_reference(tls, fde) == NULL) {
-               talloc_free(new_sock);
-               return NULL;
-       }
-       if (talloc_reference(tls, socket_ctx) == NULL) {
-               talloc_free(new_sock);
-               return NULL;
-       }
 
        new_sock->private_data    = tls;