/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2003-2005 The OpenLDAP Foundation.
+ * Copyright 2003-2007 The OpenLDAP Foundation.
* Portions Copyright 2004 by IBM Corporation.
* All rights reserved.
*
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;
}
}
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;
/*
* TAG : "item", "and", "or", "not"
*/
-static int
+static ber_tag_t
strip_cav_tag( ComponentAssertionValue* cav )
{
ber_tag_t tag;
int err;
ComponentFilter f;
- /* TAG : item, and, or, not in RFC 2254 */
+ /* TAG : item, and, or, not in RFC 4515 */
tag = strip_cav_tag( cav );
if ( tag == LBER_ERROR ) {