ITS#2464 don't strdup NULL DN

This commit is contained in:
Howard Chu 2003-04-25 12:44:19 +00:00
parent deea8db4cd
commit e4f1c459c2

View File

@ -1066,8 +1066,10 @@ slapi_search_internal_bind(
ptr = (Slapi_PBlock *)op->o_pb;
op->o_ctrls = controls;
dn.bv_val = slapi_ch_strdup(ldn);
dn.bv_len = strlen(ldn);
if ( ldn != NULL ) {
dn.bv_val = slapi_ch_strdup(ldn);
dn.bv_len = strlen(ldn);
}
rs.sr_err = dnPrettyNormal( NULL, &dn, &op->o_req_dn, &op->o_req_ndn, NULL );
if ( rs.sr_err != LDAP_SUCCESS ) {