handle failure or missing attrs

This commit is contained in:
Pierangelo Masarati 2003-04-04 09:55:56 +00:00
parent b282339c96
commit 19dc49180d

View file

@ -488,11 +488,13 @@ ldap_build_entry(
* later, the local subschemaSubentry is
* added.
*/
( void )ber_scanf( &ber, "[W]", &vals );
for ( bv = vals; bv->bv_val; bv++ ) {
LBER_FREE( bv->bv_val );
if ( ber_scanf( &ber, "[W]", &vals ) != LBER_ERROR
&& vals != NULL ) {
for ( bv = vals; bv->bv_val; bv++ ) {
LBER_FREE( bv->bv_val );
}
LBER_FREE( vals );
}
LBER_FREE( vals );
ch_free(attr);
continue;