]> git.sur5r.net Git - openldap/commitdiff
Fix filter init
authorHoward Chu <hyc@openldap.org>
Tue, 28 Jul 2015 11:10:54 +0000 (12:10 +0100)
committerHoward Chu <hyc@openldap.org>
Tue, 28 Jul 2015 11:10:54 +0000 (12:10 +0100)
compound filters f_next is not ignored

contrib/slapd-modules/adremap/adremap.c

index 482308b6a8911f7d8582b85849f8c632224fd80a..02cc27075bad3d157e265690945134ada43ea465 100644 (file)
@@ -357,6 +357,7 @@ static void adremap_filter(
                                         */
                                        fr[0].f_choice = LDAP_FILTER_AND;
                                        fr[0].f_and = &fr[1];
+                                       fr[0].f_next = NULL;
 
                                        fr[1].f_choice = LDAP_FILTER_EQUALITY;
                                        fr[1].f_ava = &aa[0];
@@ -404,6 +405,7 @@ static void adremap_filter(
                                        f = op->o_tmpalloc(sizeof(Filter), op->o_tmpmemctx);
                                        f->f_choice = LDAP_FILTER_AND;
                                        fnew = f;
+                                       f->f_next = NULL;
 
                                        f->f_and = op->o_tmpalloc(sizeof(Filter), op->o_tmpmemctx);
                                        f = f->f_and;