This commit is contained in:
Kurt Zeilenga 2004-12-30 19:15:52 +00:00
parent e66a962401
commit 951159447b
3 changed files with 10 additions and 4 deletions

View File

@ -43,8 +43,9 @@
void void
attr_free( Attribute *a ) attr_free( Attribute *a )
{ {
if ( a->a_nvals && a->a_nvals != a->a_vals ) if ( a->a_nvals && a->a_nvals != a->a_vals ) {
ber_bvarray_free( a->a_nvals ); ber_bvarray_free( a->a_nvals );
}
ber_bvarray_free( a->a_vals ); ber_bvarray_free( a->a_vals );
free( a ); free( a );
} }

View File

@ -1040,7 +1040,9 @@ static int parsePreRead (
an[i].an_oc_exclude = 0; an[i].an_oc_exclude = 0;
rc = slap_bv2ad( &an[i].an_name, &an[i].an_desc, &dummy ); rc = slap_bv2ad( &an[i].an_name, &an[i].an_desc, &dummy );
if ( rc != LDAP_SUCCESS && ctrl->ldctl_iscritical ) { if ( rc != LDAP_SUCCESS && ctrl->ldctl_iscritical ) {
rs->sr_text = dummy ? dummy : "postread control: unknown attributeType"; rs->sr_text = dummy
? dummy
: "postread control: unknown attributeType";
return rc; return rc;
} }
} }
@ -1096,7 +1098,9 @@ static int parsePostRead (
an[i].an_oc_exclude = 0; an[i].an_oc_exclude = 0;
rc = slap_bv2ad( &an[i].an_name, &an[i].an_desc, &dummy ); rc = slap_bv2ad( &an[i].an_name, &an[i].an_desc, &dummy );
if ( rc != LDAP_SUCCESS && ctrl->ldctl_iscritical ) { if ( rc != LDAP_SUCCESS && ctrl->ldctl_iscritical ) {
rs->sr_text = dummy ? dummy : "postread control: unknown attributeType"; rs->sr_text = dummy
? dummy
: "postread control: unknown attributeType";
return rc; return rc;
} }
} }

View File

@ -164,7 +164,8 @@ do_search(
op->ors_attrs[i].an_desc = NULL; op->ors_attrs[i].an_desc = NULL;
op->ors_attrs[i].an_oc = NULL; op->ors_attrs[i].an_oc = NULL;
op->ors_attrs[i].an_oc_exclude = 0; op->ors_attrs[i].an_oc_exclude = 0;
slap_bv2ad(&op->ors_attrs[i].an_name, &op->ors_attrs[i].an_desc, &dummy); slap_bv2ad(&op->ors_attrs[i].an_name,
&op->ors_attrs[i].an_desc, &dummy);
} }
if( get_ctrls( op, rs, 1 ) != LDAP_SUCCESS ) { if( get_ctrls( op, rs, 1 ) != LDAP_SUCCESS ) {