From: Kurt Zeilenga Date: Mon, 31 May 2004 04:01:03 +0000 (+0000) Subject: cleanup X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~311 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3dcc2bf0924b9c876b2722882077604f50734fa8;p=openldap cleanup --- diff --git a/servers/slapd/saslauthz.c b/servers/slapd/saslauthz.c index ffc2bde4f2..379e85e38e 100644 --- a/servers/slapd/saslauthz.c +++ b/servers/slapd/saslauthz.c @@ -977,16 +977,16 @@ exact_match: * we need to append the so that the is searched * with scope "base", and the filter ensures that is * member of the group */ - tmp = ch_realloc( op.ors_filterstr.bv_val, - op.ors_filterstr.bv_len + assertDN->bv_len + STRLENOF( /* (( */ "))" ) + 1 ); + tmp = ch_realloc( op.ors_filterstr.bv_val, op.ors_filterstr.bv_len + + assertDN->bv_len + STRLENOF( /*"(("*/ "))" ) + 1 ); if ( tmp == NULL ) { rc = LDAP_NO_MEMORY; goto CONCLUDED; } op.ors_filterstr.bv_val = tmp; - tmp = lutil_strcopy( &tmp[ op.ors_filterstr.bv_len ], assertDN->bv_val ); - tmp = lutil_strcopy( tmp, /* (( */ "))" ); + tmp = lutil_strcopy( &tmp[op.ors_filterstr.bv_len], assertDN->bv_val ); + tmp = lutil_strcopy( tmp, /*"(("*/ "))" ); /* pass opx because str2filter_x may (and does) use o_tmpmfuncs */ op.ors_filter = str2filter_x( opx, op.ors_filterstr.bv_val ); @@ -1246,10 +1246,18 @@ FINISHED: if( !BER_BVISEMPTY( sasldn ) ) { opx->o_conn->c_authz_backend = op.o_bd; } - if( !BER_BVISNULL( &op.o_req_dn ) ) slap_sl_free( op.o_req_dn.bv_val, opx->o_tmpmemctx ); - if( !BER_BVISNULL( &op.o_req_ndn ) ) slap_sl_free( op.o_req_ndn.bv_val, opx->o_tmpmemctx ); - if( op.oq_search.rs_filter ) filter_free_x( opx, op.oq_search.rs_filter ); - if( !BER_BVISNULL( &op.ors_filterstr ) ) ch_free( op.ors_filterstr.bv_val ); + if( !BER_BVISNULL( &op.o_req_dn ) ) { + slap_sl_free( op.o_req_dn.bv_val, opx->o_tmpmemctx ); + } + if( !BER_BVISNULL( &op.o_req_ndn ) ) { + slap_sl_free( op.o_req_ndn.bv_val, opx->o_tmpmemctx ); + } + if( op.oq_search.rs_filter ) { + filter_free_x( opx, op.oq_search.rs_filter ); + } + if( !BER_BVISNULL( &op.ors_filterstr ) ) { + ch_free( op.ors_filterstr.bv_val ); + } #ifdef NEW_LOGGING LDAP_LOG( TRANSPORT, ENTRY,