summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/entry.c
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2005-03-05 04:29:24 +0000
committerRich Megginson <rmeggins@redhat.com>2005-03-05 04:29:24 +0000
commitb352660e243c7b9b7d050f1c38cff1c9faf278b1 (patch)
treeede08019beb931c3206609ab2377a015d510bdb4 /ldap/servers/slapd/entry.c
parentf08951680ddfebc3f3df07e720ad0650fe473c0f (diff)
downloadds-b352660e243c7b9b7d050f1c38cff1c9faf278b1.tar.gz
ds-b352660e243c7b9b7d050f1c38cff1c9faf278b1.tar.xz
ds-b352660e243c7b9b7d050f1c38cff1c9faf278b1.zip
clean up sprintf usage and many other flawfinder issues; clean up compiler warnings on Linux; remove pam_passthru from DS 7.1
Diffstat (limited to 'ldap/servers/slapd/entry.c')
-rw-r--r--ldap/servers/slapd/entry.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ldap/servers/slapd/entry.c b/ldap/servers/slapd/entry.c
index d4d49733..0989b37f 100644
--- a/ldap/servers/slapd/entry.c
+++ b/ldap/servers/slapd/entry.c
@@ -176,7 +176,7 @@ str2entry_fast( char *s, int flags, int read_stateinfo )
if ( errmsg != NULL ) {
LDAPDebug( LDAP_DEBUG_PARSE, "%s", errmsg, 0, 0 );
/* the memory below was not allocated by the slapi_ch_ functions */
- slapi_ch_free( (void**)&errmsg );
+ PR_smprintf_free(errmsg );
}
LDAPDebug( LDAP_DEBUG_TRACE,
"<= str2entry_fast NULL (parse_line)\n", 0, 0, 0 );
@@ -584,7 +584,7 @@ str2entry_dupcheck( char *s, int flags, int read_stateinfo )
if ( errmsg != NULL ) {
LDAPDebug( LDAP_DEBUG_PARSE, "%s", errmsg, 0, 0 );
/* the memory below was not allocated by the slapi_ch_ functions */
- slapi_ch_free( (void**)&errmsg );
+ PR_smprintf_free(errmsg );
}
LDAPDebug( LDAP_DEBUG_TRACE,
"<= slapi_str2entry NULL (parse_line)\n", 0, 0, 0 );
@@ -3018,8 +3018,7 @@ slapi_entries_diff(Slapi_Entry **old_entries, Slapi_Entry **curr_entries,
if (NULL != logging_prestr && '\0' != *logging_prestr)
{
- my_logging_prestr = (char *)slapi_ch_malloc(strlen(logging_prestr) + 2);
- sprintf(my_logging_prestr, "%s ", logging_prestr);
+ my_logging_prestr = slapi_ch_smprintf("%s ", logging_prestr);
}
for (oep = old_entries; oep != NULL && *oep != NULL; )