1 /* ch_malloc.c - malloc routines that test returns from malloc and friends */
20 if ( (new = (void *) malloc( size )) == NULL ) {
21 Debug( LDAP_DEBUG_ANY, "malloc of %lu bytes failed\n", size, 0, 0 );
36 if ( block == NULL ) {
37 return( ch_malloc( size ) );
40 if ( (new = (void *) realloc( block, size )) == NULL ) {
41 Debug( LDAP_DEBUG_ANY, "realloc of %lu bytes failed\n", size, 0, 0 );
56 if ( (new = (void *) calloc( nelem, size )) == NULL ) {
57 Debug( LDAP_DEBUG_ANY, "calloc of %lu elems of %lu bytes failed\n",
72 if ( (new = strdup( string )) == NULL ) {
73 Debug( LDAP_DEBUG_ANY, "strdup(%s) failed\n", string, 0, 0 );