From: Pierangelo Masarati Date: Wed, 6 Oct 2004 23:53:30 +0000 (+0000) Subject: s/free/slap_sl_free/ X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~452 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2b74930cb04a91a9da0388166c03249db19bfea7;p=openldap s/free/slap_sl_free/ --- diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index 6f63a9c0bf..91af1dd205 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -887,7 +887,7 @@ acl_mask( dn_match_cleanup:; if ( pat.bv_val != b->a_dn_pat.bv_val ) { - free( pat.bv_val ); + slap_sl_free( pat.bv_val, op->o_tmpmemctx ); } if ( !got_match ) { @@ -1299,7 +1299,9 @@ dn_match_cleanup:; rc = backend_group( op, e, &bv, &op->o_ndn, b->a_group_oc, b->a_group_at ); - if ( ndn.bv_val ) free( ndn.bv_val ); + if ( ndn.bv_val ) { + slap_sl_free( ndn.bv_val, op->o_tmpmemctx ); + } if ( rc != 0 ) { continue; @@ -2039,10 +2041,10 @@ aci_group_member ( rc = LDAP_OTHER; goto done; } - if ( dnNormalize(0, NULL, NULL, &bv, &ndn, op->o_tmpmemctx) == LDAP_SUCCESS ) { - rc = (backend_group(op, e, &ndn, &op->o_ndn, - grp_oc, grp_ad) == 0); - free( ndn.bv_val ); + if ( dnNormalize( 0, NULL, NULL, &bv, &ndn, op->o_tmpmemctx ) == LDAP_SUCCESS ) { + rc = ( backend_group( op, e, &ndn, &op->o_ndn, + grp_oc, grp_ad ) == 0 ); + slap_sl_free( ndn.bv_val, op->o_tmpmemctx ); } } @@ -2113,10 +2115,11 @@ aci_mask( if (ber_bvstrcasecmp( &aci_bv_access_id, &bv ) == 0) { struct berval ndn; rc = 0; - if ( dnNormalize(0, NULL, NULL, &sdn, &ndn, op->o_tmpmemctx) == LDAP_SUCCESS ) { - if (dn_match( &op->o_ndn, &ndn)) + if ( dnNormalize( 0, NULL, NULL, &sdn, &ndn, op->o_tmpmemctx ) == LDAP_SUCCESS ) { + if ( dn_match( &op->o_ndn, &ndn ) ) { rc = 1; - free(ndn.bv_val); + } + slap_sl_free( ndn.bv_val, op->o_tmpmemctx ); } return (rc);