s4-ldap: removed an incorrect talloc_move()
authorAndrew Tridgell <tridge@samba.org>
Wed, 1 Dec 2010 12:54:38 +0000 (23:54 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 1 Dec 2010 21:10:42 +0000 (22:10 +0100)
the parent of this session_info is either the stream_connection, or
its a system_session(). In either case reparenting it on the
ldapsrv_connection doesn't achieve anything that I can see.

The move was causing a steal on reference error because the
session_info often has multiple references.

Thanks to Metze for spotting this.

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Dec  1 22:10:42 CET 2010 on sn-devel-104

source4/ldap_server/ldap_server.c

index 67fe18330f47456cc54fe91d9d4ef45399c7f48d..db775c9a1239c0fea5ecefa06334e7e114c8179f 100644 (file)
@@ -330,7 +330,7 @@ static void ldapsrv_accept(struct stream_connection *c,
        }
        conn->server_credentials = server_credentials;
 
-       conn->session_info = talloc_move(conn, &session_info);
+       conn->session_info = session_info;
 
        if (!NT_STATUS_IS_OK(ldapsrv_backend_Init(conn))) {
                ldapsrv_terminate_connection(conn, "backend Init failed");