]> git.sur5r.net Git - openldap/commitdiff
ITS#5056 from HEAD
authorHoward Chu <hyc@openldap.org>
Sun, 22 Jul 2007 17:55:36 +0000 (17:55 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 22 Jul 2007 17:55:36 +0000 (17:55 +0000)
libraries/libldap/addentry.c

index 229524cd2ee2f98c1bed6e469e29371e46ef7bea..db4568dc7f3257bc7585289d604f5399b99dfa7f 100644 (file)
@@ -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;
 }