Skip to content
Snippets Groups Projects
Commit 8669824f authored by Julius Enarusai's avatar Julius Enarusai
Browse files

Converted ch_calloc calls to SLAP_CALLOC.
parent 6e9c21cf
Branches
Tags
No related merge requests found
......@@ -94,7 +94,16 @@ syn_insert(
if ( ssyn->ssyn_oid ) {
sir = (struct sindexrec *)
ch_calloc( 1, sizeof(struct sindexrec) );
SLAP_CALLOC( 1, sizeof(struct sindexrec) );
if( sir == NULL ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ERR,
"syn_insert: SLAP_CALLOC Error\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "SLAP_CALLOC Error\n", 0, 0, 0 );
#endif
return LDAP_OTHER;
}
sir->sir_name = ssyn->ssyn_oid;
sir->sir_syn = ssyn;
if ( avl_insert( &syn_index, (caddr_t) sir,
......@@ -120,7 +129,16 @@ syn_add(
Syntax *ssyn;
int code;
ssyn = (Syntax *) ch_calloc( 1, sizeof(Syntax) );
ssyn = (Syntax *) SLAP_CALLOC( 1, sizeof(Syntax) );
if( ssyn == NULL ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ERR,
"syn_add: SLAP_CALLOC Error\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "SLAP_CALLOC Error\n", 0, 0, 0 );
#endif
return LDAP_OTHER;
}
AC_MEMCPY( &ssyn->ssyn_syn, syn, sizeof(LDAPSyntax) );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment