From 4fa5a1c8453379e1b1bd39dea14b7e736b9ae41f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 19 Sep 2006 02:04:11 +0000 Subject: r18670: Fix memleaks. Guenther (This used to be commit 2fc63fb8f7927ea61c565801b4c6308d3a4afcd1) --- source3/libads/ldap_schema.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/libads') diff --git a/source3/libads/ldap_schema.c b/source3/libads/ldap_schema.c index da8b168c21..b4a512cbfe 100644 --- a/source3/libads/ldap_schema.c +++ b/source3/libads/ldap_schema.c @@ -165,10 +165,12 @@ static ADS_STATUS ads_schema_path(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char **s } if ( (schema = ads_pull_string(ads, mem_ctx, res, "schemaNamingContext")) == NULL ) { + ads_msgfree(ads, res); return ADS_ERROR(LDAP_NO_RESULTS_RETURNED); } if ( (*schema_path = talloc_strdup(mem_ctx, schema)) == NULL ) { + ads_msgfree(ads, res); return ADS_ERROR(LDAP_NO_MEMORY); } -- cgit