From b20eb4825b1820997d1cdf044291044232902a81 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 17 Mar 2003 22:10:49 +0000 Subject: Fix memory leak. Volker (This used to be commit 115cd4b27f84343c7f98622717edda6da4866a6b) --- source3/passdb/pdb_ldap.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/passdb') 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; } -- cgit