From 4525becf4cfa6c90c23d8082d88321b12356ba41 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 --- source/libads/ldap_schema.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/libads/ldap_schema.c b/source/libads/ldap_schema.c index da8b168c21c..b4a512cbfe2 100644 --- a/source/libads/ldap_schema.c +++ b/source/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