From c678563efec82e84c9c86309cbf9495950a02b8c Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sat, 17 Apr 2010 20:08:15 +0200 Subject: s4:kdc/db-glue.c - use "TALLOC_FREE" insteal of "talloc_free" for the "priv" context Also after a free "priv" could be != NULL and may be freed again. This should fix bug #7365. --- source4/kdc/db-glue.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source4') diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c index 49babeff72..33c4c8cdf6 100644 --- a/source4/kdc/db-glue.c +++ b/source4/kdc/db-glue.c @@ -1319,7 +1319,7 @@ static krb5_error_code samba_kdc_seq(krb5_context context, } if (ret != 0) { - talloc_free(priv); + TALLOC_FREE(priv); kdc_db_ctx->seq_ctx = NULL; } else { talloc_free(mem_ctx); @@ -1341,7 +1341,7 @@ krb5_error_code samba_kdc_firstkey(krb5_context context, int lret; if (priv) { - talloc_free(priv); + TALLOC_FREE(priv); kdc_db_ctx->seq_ctx = NULL; } @@ -1367,7 +1367,7 @@ krb5_error_code samba_kdc_firstkey(krb5_context context, ret = krb5_get_default_realm(context, &realm); if (ret != 0) { - talloc_free(priv); + TALLOC_FREE(priv); return ret; } @@ -1376,7 +1376,7 @@ krb5_error_code samba_kdc_firstkey(krb5_context context, "(objectClass=user)"); if (lret != LDB_SUCCESS) { - talloc_free(priv); + TALLOC_FREE(priv); return HDB_ERR_NOENTRY; } @@ -1389,7 +1389,7 @@ krb5_error_code samba_kdc_firstkey(krb5_context context, ret = samba_kdc_seq(context, kdc_db_ctx, entry); if (ret != 0) { - talloc_free(priv); + TALLOC_FREE(priv); kdc_db_ctx->seq_ctx = NULL; } else { talloc_free(mem_ctx); -- cgit