]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-monitor/init.c
check consistency of referrals and result code (ITS#4861)
[openldap] / servers / slapd / back-monitor / init.c
index ed29b9de619c3e6e75f6bf65081ba447309948a2..978d1301c8809a38fe35f8398196d4c73fad8e22 100644 (file)
@@ -706,6 +706,7 @@ monitor_search2ndn(
        Connection      conn = { 0 };
        OperationBuffer opbuf;
        Operation       *op;
+       void    *thrctx;
        SlapReply       rs = { 0 };
        slap_callback   cb = { NULL, monitor_search2ndn_cb, NULL, NULL };
        int             rc;
@@ -717,14 +718,13 @@ monitor_search2ndn(
        }
 
        op = (Operation *) &opbuf;
-       connection_fake_init( &conn, op, &conn );
+       thrctx = ldap_pvt_thread_pool_context();
+       connection_fake_init( &conn, op, thrctx );
 
        op->o_tag = LDAP_REQ_SEARCH;
 
        /* use global malloc for now */
        if ( op->o_tmpmemctx ) {
-               /* FIXME: connection_fake_init() calls slap_sl_mem_create, so we destroy it for now */
-               slap_sl_mem_destroy( NULL, op->o_tmpmemctx );
                op->o_tmpmemctx = NULL;
        }
        op->o_tmpmfuncs = &ch_mfuncs;