diff options
author | Günther Deschner <gd@samba.org> | 2006-09-19 02:04:11 +0000 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2006-09-19 02:04:11 +0000 |
commit | 4525becf4cfa6c90c23d8082d88321b12356ba41 (patch) | |
tree | 45b7d8d72cc093cb0a06ea247795b169a2032524 | |
parent | 3556a881964820c52d9764962e92f7d920fc62f5 (diff) | |
download | samba-4525becf4cfa6c90c23d8082d88321b12356ba41.tar.gz samba-4525becf4cfa6c90c23d8082d88321b12356ba41.tar.xz samba-4525becf4cfa6c90c23d8082d88321b12356ba41.zip |
r18670: Fix memleaks.
Guenther
-rw-r--r-- | source/libads/ldap_schema.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); } |