]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r22340: Fix another segfault in idmap_ldap.c caused by setting the iterator
authorGerald Carter <jerry@samba.org>
Wed, 18 Apr 2007 16:45:00 +0000 (16:45 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:19:27 +0000 (12:19 -0500)
LDAPMessage * to NULL on each loop rotation.

source/nsswitch/idmap_ldap.c

index 15f88d28c7343150e486a6d1d14eef75abe38809..d6261f407befc6a40ff3e94b29cb7073e0384d20 100644 (file)
@@ -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;