diff -ruN samba-3.4.2.orig/source3/winbindd/idmap_ldap.c samba-3.4.2.test/source3/winbindd/idmap_ldap.c --- samba-3.4.2.orig/source3/winbindd/idmap_ldap.c 2009-09-30 14:17:40.000000000 +0200 +++ samba-3.4.2.test/source3/winbindd/idmap_ldap.c 2009-10-26 17:40:06.000000000 +0100 @@ -341,6 +341,8 @@ /* see if the idmap suffix and sub entries exists */ ret = verify_idpool(); + if ( !NT_STATUS_IS_OK( ret ) ) + smbldap_free_struct( &idmap_alloc_ldap->smbldap_state ); done: if ( !NT_STATUS_IS_OK( ret ) )