From e5232bdc69af45f15bc8fd95745276018f5961be Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 25 May 2010 19:54:24 +1000 Subject: s4:kdc Remove special talloc_free of the ldb context I can see no reason not to just let this go with the talloc tree that created it, and avoid a talloc_free with references. Andrew Bartlett --- source4/kdc/hdb-samba4.c | 10 ---------- source4/kdc/mit_samba.c | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/source4/kdc/hdb-samba4.c b/source4/kdc/hdb-samba4.c index f91eeb4073..6534dbd27a 100644 --- a/source4/kdc/hdb-samba4.c +++ b/source4/kdc/hdb-samba4.c @@ -119,16 +119,6 @@ static krb5_error_code hdb_samba4_nextkey(krb5_context context, HDB *db, unsigne static krb5_error_code hdb_samba4_destroy(krb5_context context, HDB *db) { - struct samba_kdc_db_context *kdc_db_ctx; - - kdc_db_ctx = talloc_get_type_abort(db->hdb_db, - struct samba_kdc_db_context); - - if (kdc_db_ctx) { - talloc_free(kdc_db_ctx->samdb); - kdc_db_ctx->samdb = NULL; - } - talloc_free(db); return 0; } diff --git a/source4/kdc/mit_samba.c b/source4/kdc/mit_samba.c index 7718e56d65..cb1284cfca 100644 --- a/source4/kdc/mit_samba.c +++ b/source4/kdc/mit_samba.c @@ -98,7 +98,7 @@ static int mit_samba_context_init(struct mit_samba_context **_ctx) cli_credentials_set_kerberos_state(ctx->session_info->credentials, CRED_DONT_USE_KERBEROS); - ctx->db_ctx->samdb = samdb_connect(ctx, + ctx->db_ctx->samdb = samdb_connect(ctx->db_ctx, ctx->db_ctx->ev_ctx, ctx->db_ctx->lp_ctx, ctx->session_info); -- cgit