]> git.sur5r.net Git - openldap/commitdiff
fix previous commit (ITS#5711)
authorPierangelo Masarati <ando@openldap.org>
Sat, 27 Sep 2008 10:34:52 +0000 (10:34 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 27 Sep 2008 10:34:52 +0000 (10:34 +0000)
servers/slapd/overlays/ppolicy.c

index 36836c51271f01c0344b7af4bbb7d5785e2ebb24..99db2bd5b1326afb26c370541ed08ead84d5c286 100644 (file)
@@ -855,8 +855,7 @@ ctrls_cleanup( Operation *op, SlapReply *rs, LDAPControl **oldctrls )
 
        for ( n = 0; rs->sr_ctrls[n]; n++ ) {
                if ( rs->sr_ctrls[n]->ldctl_oid == ppolicy_ctrl_oid ) {
-                       ch_free( rs->sr_ctrls[n]->ldctl_value.bv_val );
-                       ch_free( rs->sr_ctrls[n] );
+                       op->o_tmpfree( rs->sr_ctrls[n], op->o_tmpmemctx );
                        rs->sr_ctrls[n] = (LDAPControl *)(-1);
                        break;
                }
@@ -2021,7 +2020,7 @@ return_results:
        if ( send_ctrl ) {
                if ( is_pwdexop ) {
                        if ( rs->sr_flags & REP_CTRLS_MUSTBEFREED ) {
-                               slap_free_ctrls( op, oldctrls );
+                               op->o_tmpfree( oldctrls, op->o_tmpmemctx );
                        }
                        oldctrls = NULL;
                        rs->sr_flags |= REP_CTRLS_MUSTBEFREED;