passdb: Patch memory leak in pdb_ldap.c
authorJose A. Rivera <jarrpa@redhat.com>
Tue, 18 Feb 2014 13:35:37 +0000 (07:35 -0600)
committerSimo Sorce <idra@samba.org>
Fri, 21 Feb 2014 21:55:47 +0000 (16:55 -0500)
commit9a9e56943d186e5a8655b5d731a339e453da8ae8
treef00befc04084a5bfd4eb10b3bc8dd28ff7d95e0e
parent293aac0508d64551f549512d622e04ed22f297f6
passdb: Patch memory leak in pdb_ldap.c

Moved the call to the talloc autofree function to as early a point as
possible. init_ldap_from_sam() already calls smbldap_set_mod(), and there's
a chance that the init will fail after having already allocated memory for
&mods.

Coverity-Id: 1167997
Change-Id: Ic26bfb3c530f90aa885e447b8409deba49708d64
Reviewed-by: Ira Cooper <ira@samba.org>
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
Reviewed-by: Simo Sorce <idra@samba.org>
source3/passdb/pdb_ldap.c