summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-05-18 01:05:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:37 -0500
commit05bc3279906d63f30df1c373a50c521a171225ab (patch)
tree81f8591e5414da1528e2fdda2fc9b5d46af6782b /source3
parent49f95e6d27ac9476e8308e53629e8ae4908957c6 (diff)
downloadsamba-05bc3279906d63f30df1c373a50c521a171225ab.tar.gz
samba-05bc3279906d63f30df1c373a50c521a171225ab.tar.bz2
samba-05bc3279906d63f30df1c373a50c521a171225ab.zip
r764: More memleak fixes in error code path from kawasa_r@itg.hitachi.co.jp.
Jeremy. (This used to be commit 9647394e7c79c81ac4cf276a2c4b9e16eb053ec2)
Diffstat (limited to 'source3')
-rw-r--r--source3/libads/ldap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index e156857e96..e018eeb2da 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -1980,17 +1980,22 @@ ADS_STATUS ads_server_info(ADS_STRUCT *ads)
}
status = ads_do_search(ads, "", LDAP_SCOPE_BASE, "(objectclass=*)", attrs, &res);
- if (!ADS_ERR_OK(status)) return status;
+ if (!ADS_ERR_OK(status)) {
+ talloc_destroy(ctx);
+ return status;
+ }
value = ads_pull_string(ads, ctx, res, "ldapServiceName");
if (!value) {
ads_msgfree(ads, res);
+ talloc_destroy(ctx);
return ADS_ERROR(LDAP_NO_RESULTS_RETURNED);
}
timestr = ads_pull_string(ads, ctx, res, "currentTime");
if (!timestr) {
ads_msgfree(ads, res);
+ talloc_destroy(ctx);
return ADS_ERROR(LDAP_NO_RESULTS_RETURNED);
}