From: Howard Chu Date: Mon, 27 May 2013 15:57:15 +0000 (-0700) Subject: ITS#7608 promoted attrs must have valid ad_index X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6dab36e97afb680452a13efd41e8653a8949e2aa;p=openldap ITS#7608 promoted attrs must have valid ad_index --- diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c index d1e4868dd5..71ea438a27 100644 --- a/servers/slapd/ad.c +++ b/servers/slapd/ad.c @@ -844,6 +844,9 @@ undef_promote( tmp->ad_next = NULL; /* ad_cname was contiguous, no leak here */ tmp->ad_cname = nat->sat_cname; + ldap_pvt_thread_mutex_lock( &ad_index_mutex ); + tmp->ad_index = ++ad_count; + ldap_pvt_thread_mutex_unlock( &ad_index_mutex ); *n_ad = tmp; n_ad = &tmp->ad_next; } else {