]> git.sur5r.net Git - openldap/commitdiff
ITS#4780 plug leak
authorHoward Chu <hyc@openldap.org>
Wed, 20 Dec 2006 05:41:14 +0000 (05:41 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 20 Dec 2006 05:41:14 +0000 (05:41 +0000)
servers/slapd/sets.c

index 50a4d0d56ef5909eb3627fecbe98be586427a743..82c1831c4a645347a9e54ba4489143d81906b973 100644 (file)
@@ -265,10 +265,14 @@ slap_set_join(
 
 done:;
        if ( !( op_flags & SLAP_SET_LREFARR ) && lset != NULL ) {
+               if ( !( op_flags & SLAP_SET_LREFVAL ))
+                       cp->set_op->o_tmpfree( lset->bv_val, cp->set_op->o_tmpmemctx );
                cp->set_op->o_tmpfree( lset, cp->set_op->o_tmpmemctx );
        }
 
        if ( !( op_flags & SLAP_SET_RREFARR ) && rset != NULL ) {
+               if ( !( op_flags & SLAP_SET_RREFVAL ))
+                       cp->set_op->o_tmpfree( rset->bv_val, cp->set_op->o_tmpmemctx );
                cp->set_op->o_tmpfree( rset, cp->set_op->o_tmpmemctx );
        }