]> git.sur5r.net Git - openldap/commitdiff
ITS#6758 fix/add slap_send_search_entry() comments
authorHallvard Furuseth <hallvard@openldap.org>
Fri, 31 Dec 2010 19:57:53 +0000 (19:57 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Fri, 31 Dec 2010 19:57:53 +0000 (19:57 +0000)
servers/slapd/result.c

index 5d8ef0485d5f43425a7ff3faa6fbe0a99ae3b543..6456bd8273e7896725d926a431d32eac136396b3 100644 (file)
@@ -1391,6 +1391,7 @@ error_return:;
                slap_sl_free( e_flags, op->o_tmpmemctx );
        }
 
+       /* FIXME: Can break if rs now contains an extended response */
        if ( rs->sr_operational_attrs ) {
                attrs_free( rs->sr_operational_attrs );
                rs->sr_operational_attrs = NULL;
@@ -1402,6 +1403,10 @@ error_return:;
         * function. send_ldap_error may have changed it, but we
         * should set it back so that the cleanup functions know
         * what they're doing.
+        *
+        * ...No, that's what we set it to on entering this function.
+        * And we may have to clear out rs->sr_un.sru_search first,
+        * if it can contain data from sr_un.sru_extended.
         */
        if ( op->o_tag == LDAP_REQ_SEARCH && rs->sr_type == REP_SEARCH ) {
                rs_flush_entry( op, rs, NULL );