diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c
index 250f14100ca4ea75df830cdf056861978434af08..4c7d539354958e0329af8d6aefaf31f21a23858e 100644
--- a/servers/slapd/bconfig.c
+++ b/servers/slapd/bconfig.c
@@ -4609,7 +4609,11 @@ config_renumber_one( Operation *op, SlapReply *rs, CfEntryInfo *parent,
 	/* Do the equivalent of ModRDN */
 	/* Replace DN / NDN */
 	newrdn.bv_len = ptr1 - newrdn.bv_val;
-	rdnNormalize( 0, NULL, NULL, &newrdn, &nnewrdn, NULL );
+	rc = rdnNormalize( 0, NULL, NULL, &newrdn, &nnewrdn, NULL );
+	if ( rc ) {
+		free( newrdn.bv_val );
+		return LDAP_NAMING_VIOLATION;
+	}
 	rc = config_rename_one( op, rs, e, parent, a, &newrdn, &nnewrdn, use_ldif );
 
 	free( nnewrdn.bv_val );