diff options
author | Volker Lendecke <vlendec@samba.org> | 2003-03-17 22:09:06 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2003-03-17 22:09:06 +0000 |
commit | 0a8e719a4bc6ac88bea6b76e7a7d840bb0fed403 (patch) | |
tree | 1c784d85efbbb6f4b4c8242d641c45c86df37968 /source3 | |
parent | 4adde4c8505851cba42b3d5315a5206eb7825c90 (diff) | |
download | samba-0a8e719a4bc6ac88bea6b76e7a7d840bb0fed403.tar.gz samba-0a8e719a4bc6ac88bea6b76e7a7d840bb0fed403.tar.bz2 samba-0a8e719a4bc6ac88bea6b76e7a7d840bb0fed403.zip |
Fix memory leak.
Volker
(This used to be commit e8975d6e7bdcceb78a83a3446cf1430e1e3f1a72)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/passdb/pdb_ldap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 548d7bc60d..46e0994379 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; } |