summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-03-01 02:43:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:16 -0500
commit8e00e9d7a6114089fc176bc3446c6c97a01543d6 (patch)
tree9c5b58be176c12282be1226dd4369cb80a66bb6b /source3/passdb
parentfae01b48994fd3168fd921af68dab1b4003adc49 (diff)
downloadsamba-8e00e9d7a6114089fc176bc3446c6c97a01543d6.tar.gz
samba-8e00e9d7a6114089fc176bc3446c6c97a01543d6.tar.bz2
samba-8e00e9d7a6114089fc176bc3446c6c97a01543d6.zip
r21609: Fix memory leaks in error code paths (and one in winbindd_group.c).
Patch from Zack Kirsch <zack.kirsch@isilon.com>. Jeremy. (This used to be commit df07a662e32367a52c1e8473475423db2ff5bc51)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pdb_ldap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 5fd607a7fc..c4c53c3066 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -5673,6 +5673,7 @@ NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location)
dn = smbldap_get_dn(ldap_state->smbldap_state->ldap_struct, entry);
if (!dn) {
+ ldap_msgfree(result);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -5689,6 +5690,7 @@ NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location)
if (!string_to_sid(&ldap_domain_sid, domain_sid_string)) {
DEBUG(1, ("pdb_init_ldapsam: SID [%s] could not be "
"read as a valid SID\n", domain_sid_string));
+ ldap_msgfree(result);
return NT_STATUS_INVALID_PARAMETER;
}
found_sid = secrets_fetch_domain_sid(ldap_state->domain_name,