diff --git a/servers/slapd/overlays/refint.c b/servers/slapd/overlays/refint.c index 20f9ef1e91..2e49a94be5 100644 --- a/servers/slapd/overlays/refint.c +++ b/servers/slapd/overlays/refint.c @@ -249,8 +249,11 @@ refint_cf_gen(ConfigArgs *c) ip = ch_malloc ( sizeof ( refint_attrs ) ); ip->attr = ad; - ip->next = dd->attrs; - dd->attrs = ip; + + for ( pipp = &dd->attrs; *pipp; pipp = &(*pipp)->next ) + /* Get to the end */ ; + ip->next = *pipp; + *pipp = ip; } else { snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s <%s>: %s", c->argv[0], c->argv[i], text );