summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-03-17 22:10:49 +0000
committerVolker Lendecke <vlendec@samba.org>2003-03-17 22:10:49 +0000
commitb20eb4825b1820997d1cdf044291044232902a81 (patch)
treed2c5f85df1d421e00eb1192e9e4c5f21887b4f07 /source3
parent4b0d05510658bababa46a6161c530193df726b2e (diff)
downloadsamba-b20eb4825b1820997d1cdf044291044232902a81.tar.gz
samba-b20eb4825b1820997d1cdf044291044232902a81.tar.bz2
samba-b20eb4825b1820997d1cdf044291044232902a81.zip
Fix memory leak.
Volker (This used to be commit 115cd4b27f84343c7f98622717edda6da4866a6b)
Diffstat (limited to 'source3')
-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 e058d2d108..62fc5810d1 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -1838,12 +1838,14 @@ static NTSTATUS ldapsam_update_sam_account(struct pdb_methods *my_methods, SAM_A
rc = ldapsam_search_one_user_by_name(ldap_state, pdb_get_username(newpwd), &result);
if (rc != LDAP_SUCCESS) {
+ ldap_mods_free(mods, 1);
return NT_STATUS_UNSUCCESSFUL;
}
if (ldap_count_entries(ldap_state->ldap_struct, result) == 0) {
DEBUG(0, ("No user to modify!\n"));
ldap_msgfree(result);
+ ldap_mods_free(mods, 1);
return NT_STATUS_UNSUCCESSFUL;
}