summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/ldap_server/ldap_extended.c1
-rw-r--r--source4/ldap_server/ldap_server.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/source4/ldap_server/ldap_extended.c b/source4/ldap_server/ldap_extended.c
index 66ab4eea32..6d630b4922 100644
--- a/source4/ldap_server/ldap_extended.c
+++ b/source4/ldap_server/ldap_extended.c
@@ -33,7 +33,6 @@ static void ldapsrv_start_tls(void *private_data)
{
struct ldapsrv_starttls_context *ctx = talloc_get_type(private_data, struct ldapsrv_starttls_context);
talloc_steal(ctx->conn->connection, ctx->tls_socket);
- talloc_unlink(ctx->conn->connection, ctx->conn->connection->socket);
ctx->conn->sockets.tls = ctx->tls_socket;
ctx->conn->connection->socket = ctx->tls_socket;
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index 2f32bb6019..72431e9669 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -49,6 +49,8 @@
void ldapsrv_terminate_connection(struct ldapsrv_connection *conn,
const char *reason)
{
+ packet_recv_disable(conn->packet);
+ TALLOC_FREE(conn->packet);
stream_terminate_connection(conn->connection, reason);
}
@@ -365,7 +367,6 @@ static void ldapsrv_accept(struct stream_connection *c,
ldapsrv_terminate_connection(conn, "ldapsrv_accept: tls_init_server() failed");
return;
}
- talloc_unlink(c, c->socket);
talloc_steal(c, tls_socket);
c->socket = tls_socket;
conn->sockets.tls = tls_socket;