Commit 19dc4918 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

handle failure or missing attrs

parent b282339c
...@@ -488,11 +488,13 @@ ldap_build_entry( ...@@ -488,11 +488,13 @@ ldap_build_entry(
* later, the local subschemaSubentry is * later, the local subschemaSubentry is
* added. * added.
*/ */
( void )ber_scanf( &ber, "[W]", &vals ); if ( ber_scanf( &ber, "[W]", &vals ) != LBER_ERROR
for ( bv = vals; bv->bv_val; bv++ ) { && vals != NULL ) {
LBER_FREE( bv->bv_val ); for ( bv = vals; bv->bv_val; bv++ ) {
LBER_FREE( bv->bv_val );
}
LBER_FREE( vals );
} }
LBER_FREE( vals );
ch_free(attr); ch_free(attr);
continue; continue;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment