summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-02-14 20:52:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:57 -0500
commit08726ffcd47eeb68eb7724e09d25322417517513 (patch)
tree63335f96a59b2452d9efa2b296fe7409ac91b9f5 /source3
parent6663fa6bdcd7098444d76b9f8413d9088588244b (diff)
downloadsamba-08726ffcd47eeb68eb7724e09d25322417517513.tar.gz
samba-08726ffcd47eeb68eb7724e09d25322417517513.tar.bz2
samba-08726ffcd47eeb68eb7724e09d25322417517513.zip
r21349: Fix memleak in ads_upn_suffixes().
Guenther (This used to be commit 8462f323cf86f90b1bdf14a3953c5a4bda1b9533)
Diffstat (limited to 'source3')
-rw-r--r--source3/libads/ldap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index d72cb4af26..949d167013 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -2638,9 +2638,12 @@ ADS_STATUS ads_upn_suffixes(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char **suffixe
config_context = ads_pull_string(ads, mem_ctx, res, "configurationNamingContext");
if (config_context == NULL) {
+ ads_msgfree(ads, res);
return ADS_ERROR(LDAP_NO_MEMORY);
}
+ ads_msgfree(ads, res);
+
base = talloc_asprintf(mem_ctx, "cn=Partitions,%s", config_context);
if (base == NULL) {
return ADS_ERROR(LDAP_NO_MEMORY);