bv2ad expects desc pointer to be NULL if unallocated

This commit is contained in:
Kurt Zeilenga 2000-05-16 20:50:49 +00:00
parent 6c49fe7d1b
commit c689e1cb74
2 changed files with 4 additions and 0 deletions

View file

@ -48,6 +48,7 @@ get_ava(
}
aa = ch_malloc( sizeof( AttributeAssertion ) );
aa->aa_desc = NULL;
rc = slap_bv2ad( &type, &aa->aa_desc, &text );
@ -59,6 +60,7 @@ get_ava(
}
aa->aa_value = value;
*ava = aa;
return LDAP_SUCCESS;
}

View file

@ -99,6 +99,8 @@ get_filter(
break;
}
assert( f->f_ava != NULL );
#ifdef SLAPD_SCHEMA_NOT_COMPAT
*fstr = ch_malloc( sizeof("(=)")
+ f->f_av_desc->ad_cname->bv_len