From 6dab36e97afb680452a13efd41e8653a8949e2aa Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 27 May 2013 08:57:15 -0700 Subject: [PATCH] ITS#7608 promoted attrs must have valid ad_index --- servers/slapd/ad.c | 3 +++ 1 file changed, 3 insertions(+) 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 { -- 2.39.5