From 41c85650c98d1e130036cec160afdf1312b11d71 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 6 Mar 2011 11:47:19 +0100 Subject: s3-idmap-ad: Make ad_schema properly talloced --- source3/winbindd/idmap_ad.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source3/winbindd/idmap_ad.c b/source3/winbindd/idmap_ad.c index 8e7f432f0b..1c46798052 100644 --- a/source3/winbindd/idmap_ad.c +++ b/source3/winbindd/idmap_ad.c @@ -100,7 +100,6 @@ static ADS_STATUS ad_idmap_cached_connection_internal(struct idmap_domain *dom) ads_destroy( &ads ); ads_kdestroy(WINBIND_CCACHE_NAME); ctx->ads = NULL; - TALLOC_FREE( ctx->ad_schema ); } } @@ -187,7 +186,8 @@ static ADS_STATUS ad_idmap_cached_connection(struct idmap_domain *dom) (ctx->ad_map_type == WB_POSIX_MAP_SFU20) || (ctx->ad_map_type == WB_POSIX_MAP_RFC2307) ) { - status = ads_check_posix_schema_mapping(NULL, ctx->ads, ctx->ad_map_type, &ctx->ad_schema); + status = ads_check_posix_schema_mapping( + ctx, ctx->ads, ctx->ad_map_type, &ctx->ad_schema); if ( !ADS_ERR_OK(status) ) { DEBUG(2,("ad_idmap_cached_connection: Failed to obtain schema details!\n")); } @@ -699,8 +699,6 @@ static NTSTATUS idmap_ad_close(struct idmap_domain *dom) ctx->ads = NULL; } - TALLOC_FREE( ctx->ad_schema ); - return NT_STATUS_OK; } -- cgit