done:;
if ( rc ) {
- if ( *atp ) {
+ if ( atp && *atp ) {
attrs_free( *atp );
*atp = NULL;
}
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;
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 );
}
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) {
}
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;
}
next[ 0 ] != '}' ||
next - vals[i].bv_val > vals[i].bv_len )
{
+ ch_free( nnew );
+ ch_free( new );
return -1;
}
if ( k > anum ) k = -1;