li->li_bvuri, NULL );
#else
char **urls = ldap_str2charray( li->li_uri, " " );
- int u;
- for ( u = 0; urls[ u ] != NULL; u++ ) {
- struct berval bv;
+ if ( urls != NULL ) {
+ int u;
+
+ for ( u = 0; urls[ u ] != NULL; u++ ) {
+ struct berval bv;
- ber_str2bv( urls[ u ], 0, 0, &bv );
+ ber_str2bv( urls[ u ], 0, 0, &bv );
- attr_merge_normalize_one( e,
+ attr_merge_normalize_one( e,
slap_schema.si_ad_labeledURI,
&bv, NULL );
- }
+ }
- ldap_charray_free( urls );
+ ldap_charray_free( urls );
+ }
#endif
#endif /* defined(SLAPD_LDAP) */
for ( t = 0; t < mi->mi_ntargets; t++ ) {
char **urls = ldap_str2charray( mi->mi_targets[ t ].mt_uri, " " );
- int u;
- for ( u = 0; urls[ u ] != NULL; u++ ) {
- struct berval bv;
+ if ( urls != NULL ) {
+ int u;
- ber_str2bv( urls[ u ], 0, 0, &bv );
+ for ( u = 0; urls[ u ] != NULL; u++ ) {
+ struct berval bv;
- attr_merge_normalize_one( e,
- slap_schema.si_ad_labeledURI,
- &bv, NULL );
+ ber_str2bv( urls[ u ], 0, 0, &bv );
+
+ attr_merge_normalize_one( e,
+ slap_schema.si_ad_labeledURI,
+ &bv, NULL );
+ }
+ ldap_charray_free( urls );
}
- ldap_charray_free( urls );
}
#endif /* defined(SLAPD_META) */
}