This commit is contained in:
Howard Chu 2006-03-31 10:45:23 +00:00
parent bb9d5b1100
commit 8cbd5ecc13
5 changed files with 9 additions and 15 deletions

View File

@ -860,7 +860,7 @@ monitor_back_register_entry_attrs(
done:;
if ( rc ) {
if ( *atp ) {
if ( atp && *atp ) {
attrs_free( *atp );
*atp = NULL;
}

View File

@ -594,16 +594,8 @@ get_component_reference(
return rc;
}
if ( rc == LDAP_SUCCESS ) {
*cr = ca_comp_ref;
**cr = *ca_comp_ref;
} else if ( op ) {
op->o_tmpfree( ca_comp_ref , op->o_tmpmemctx );
} else {
free( ca_comp_ref ) ;
}
*cr = ca_comp_ref;
**cr = *ca_comp_ref;
(*cr)->cr_string.bv_val = start;
(*cr)->cr_string.bv_len = end - start + 1;

View File

@ -1302,9 +1302,6 @@ syncprov_add_slog( Operation *op, struct berval *csn )
sl->sl_mincsn.bv_len = se->se_csn.bv_len;
ch_free( se );
sl->sl_num--;
if ( !sl->sl_head ) {
sl->sl_tail = NULL;
}
}
ldap_pvt_thread_mutex_unlock( &sl->sl_mutex );
}

View File

@ -422,6 +422,9 @@ slap_sl_free(void *ptr, void *ctx)
unsigned long diff;
int i, inserted = 0;
if (!ptr)
return;
if (!sh || ptr < sh->sh_base || ptr >= sh->sh_end) {
ber_memfree_x(ptr, NULL);
} else if (sh->sh_stack && (char *)ptr + p[-1] == sh->sh_last) {

View File

@ -75,7 +75,7 @@ value_add(
}
v2 = &(*vals)[n];
for ( ; !BER_BVISNULL( addvals ); v2++, addvals++ ) {
for ( n = 0 ; n < nn; v2++, addvals++ ) {
ber_dupbv( v2, addvals );
if ( BER_BVISNULL( v2 ) ) break;
}
@ -718,6 +718,8 @@ ordered_value_add(
next[ 0 ] != '}' ||
next - vals[i].bv_val > vals[i].bv_len )
{
ch_free( nnew );
ch_free( new );
return -1;
}
if ( k > anum ) k = -1;