From e4f1c459c27cfd2fa6160ba9afadb992409be893 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 25 Apr 2003 12:44:19 +0000 Subject: [PATCH] ITS#2464 don't strdup NULL DN --- servers/slapd/slapi/slapi_ops.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/servers/slapd/slapi/slapi_ops.c b/servers/slapd/slapi/slapi_ops.c index 18b66e63b6..9b19a485be 100644 --- a/servers/slapd/slapi/slapi_ops.c +++ b/servers/slapd/slapi/slapi_ops.c @@ -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 ) {