summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2010-09-01 12:35:26 -0600
committerRich Megginson <rmeggins@redhat.com>2010-09-01 12:35:26 -0600
commit28a607a6bfed369b9f0c82e8b5ef4b50c158a928 (patch)
treeb0a2194dbec4d560d6fae7cd029e6c5752109877
parent481ed4a2b5ccd8da5fdff445d36389a546593297 (diff)
downloadds-28a607a6bfed369b9f0c82e8b5ef4b50c158a928.tar.gz
ds-28a607a6bfed369b9f0c82e8b5ef4b50c158a928.tar.xz
ds-28a607a6bfed369b9f0c82e8b5ef4b50c158a928.zip
pass the string copy to slapi_dn_normalize_original
slapi_dn_normalize_original can modify the argument string, so we cannot pass in a const char *rawdn to that function - instead, pass in a copy created by slapi_ch_strdup
-rw-r--r--ldap/servers/slapd/entry.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldap/servers/slapd/entry.c b/ldap/servers/slapd/entry.c
index aa83c96f..82fbbb2c 100644
--- a/ldap/servers/slapd/entry.c
+++ b/ldap/servers/slapd/entry.c
@@ -264,7 +264,7 @@ str2entry_fast( const char *rawdn, char *s, int flags, int read_stateinfo )
if ( NULL == slapi_entry_get_dn_const( e )) {
if (flags & SLAPI_STR2ENTRY_USE_OBSOLETE_DNFORMAT) {
normdn =
- slapi_ch_strdup(slapi_dn_normalize_original(rawdn));
+ slapi_dn_normalize_original(slapi_ch_strdup(rawdn));
} else {
normdn = slapi_create_dn_string("%s", rawdn);
if (NULL == normdn) {
@@ -286,7 +286,7 @@ str2entry_fast( const char *rawdn, char *s, int flags, int read_stateinfo )
} else {
if (flags & SLAPI_STR2ENTRY_USE_OBSOLETE_DNFORMAT) {
normdn =
- slapi_ch_strdup(slapi_dn_normalize_original(rawdn));
+ slapi_dn_normalize_original(slapi_ch_strdup(rawdn));
} else {
normdn = slapi_create_dn_string("%s", rawdn);
if (NULL == normdn) {