ci_curr = ci_curr->ci_next, ci_temp = &(*ci_temp)->ci_next )
{
*ci_temp = op->o_tmpalloc( sizeof( ComponentId ), op->o_tmpmemctx );
- if ( !ci_temp ) return NULL;
+ if ( !*ci_temp ) return NULL;
**ci_temp = *ci_curr;
}
cr_list = &(*cr_list)->ci_next;
} else if ( rc == LDAP_COMPREF_UNDEFINED ) {
+ if ( op ) {
+ op->o_tmpfree( ca_comp_ref , op->o_tmpmemctx );
+ } else {
+ free( ca_comp_ref );
+ }
return rc;
}
}