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(
* later, the local subschemaSubentry is
* added.
*/
( void )ber_scanf( &ber, "[W]", &vals );
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 );
}
ch_free(attr);
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