s4-ldbwrap: added re-use of ldb contexts in ldb_wrap_connect()
[gd/samba/.git] / source4 / ldap_server / ldap_server.c
index 0255c72086c05e7cf8ab78864d1d31fff0a5e1d4..c45a4168f91c9397b1667e2d0fb609803d08d3cf 100644 (file)
@@ -548,7 +548,7 @@ static NTSTATUS add_socket(struct tevent_context *event_context,
 
        /* And once we are bound, free the tempoary ldb, it will
         * connect again on each incoming LDAP connection */
-       talloc_free(ldb);
+       talloc_unlink(ldap_service, ldb);
 
        return status;
 }