From: Howard Chu Date: Fri, 20 Jul 2007 21:28:04 +0000 (+0000) Subject: ITS#5056 fix chain_tail processing X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~316 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2b67f4face1c0ad184b45bfaee7469d23200d91c;p=openldap ITS#5056 fix chain_tail processing --- diff --git a/libraries/libldap/addentry.c b/libraries/libldap/addentry.c index 229524cd2e..db4568dc7f 100644 --- a/libraries/libldap/addentry.c +++ b/libraries/libldap/addentry.c @@ -64,6 +64,9 @@ ldap_add_result_entry( LDAPMessage **list, LDAPMessage *e ) assert( e != NULL ); e->lm_chain = *list; - e->lm_chain_tail = (*list)->lm_chain_tail; + if ( *list ) + e->lm_chain_tail = (*list)->lm_chain_tail; + else + e->lm_chain_tail = e; *list = e; }