From: Gerald Carter Date: Wed, 18 Apr 2007 16:45:00 +0000 (+0000) Subject: r22340: Fix another segfault in idmap_ldap.c caused by setting the iterator X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~676 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=356dd0dd3a36a8f6061ba60f556e889de7c28140;p=thirdparty%2Fsamba.git r22340: Fix another segfault in idmap_ldap.c caused by setting the iterator LDAPMessage * to NULL on each loop rotation. --- diff --git a/source/nsswitch/idmap_ldap.c b/source/nsswitch/idmap_ldap.c index 15f88d28c73..d6261f407be 100644 --- a/source/nsswitch/idmap_ldap.c +++ b/source/nsswitch/idmap_ldap.c @@ -1028,6 +1028,7 @@ static struct id_map *find_map_by_sid(struct id_map **maps, DOM_SID *sid) static NTSTATUS idmap_ldap_sids_to_unixids(struct idmap_domain *dom, struct id_map **ids) { + LDAPMessage *entry = NULL; NTSTATUS ret; TALLOC_CTX *memctx; struct idmap_ldap_context *ctx; @@ -1108,7 +1109,6 @@ again: } for (i = 0; i < count; i++) { - LDAPMessage *entry = NULL; char *sidstr = NULL; char *tmp = NULL; enum id_type type;