]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/result.c
Move ldap_utf8_*() declarations from ldap-int.h to ldap_pvt.h.
[openldap] / libraries / libldap / result.c
index 4ed68c7b8ee2b6f6faa44aa12e741d7b780b4bba..042e92a52e0a75d0cd5a863db182bb21a97838fb 100644 (file)
@@ -144,8 +144,11 @@ ldap_result(
                lastlm->lm_next = (all == 0 && lm->lm_chain != NULL
                    ? lm->lm_chain : lm->lm_next);
        }
-       if ( all == 0 )
+       if ( all == 0 && lm->lm_chain != NULL )
+       {
+               lm->lm_chain->lm_next = lm->lm_next;
                lm->lm_chain = NULL;
+       }
        lm->lm_next = NULL;
 
        *result = lm;