summaryrefslogtreecommitdiff
path: root/source3/libads/ldap_schema.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libads/ldap_schema.c')
-rw-r--r--source3/libads/ldap_schema.c2
1 files changed, 2 insertions, 0 deletions
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);
}