From 2b67f4face1c0ad184b45bfaee7469d23200d91c Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 20 Jul 2007 21:28:04 +0000 Subject: [PATCH] ITS#5056 fix chain_tail processing --- libraries/libldap/addentry.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.39.5