X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fcomponent.c;h=95413c30a2afac8b430c81cefa64c9c2e6836577;hb=6a9c44849c1c20b9d961de7a0b6585dcd059154a;hp=0b6cb2d51979ee6006437ac1ce26f16706dc11f7;hpb=8cbd5ecc13c253fcd9eb5191aa2e9a32f0298b4d;p=openldap diff --git a/servers/slapd/component.c b/servers/slapd/component.c index 0b6cb2d519..95413c30a2 100644 --- a/servers/slapd/component.c +++ b/servers/slapd/component.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2003-2006 The OpenLDAP Foundation. + * Copyright 2003-2007 The OpenLDAP Foundation. * Portions Copyright 2004 by IBM Corporation. * All rights reserved. * @@ -179,7 +179,7 @@ dup_comp_ref ( Operation* op, ComponentReference* cr ) 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; } @@ -580,6 +580,11 @@ get_component_reference( 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; } } @@ -1068,7 +1073,7 @@ parse_comp_filter( Operation* op, 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 ) {