1 /* ch_malloc.c - malloc routines that test returns from malloc and friends */
10 #include <ac/socket.h>
21 if ( (new = (void *) ber_memalloc( size )) == NULL ) {
22 Debug( LDAP_DEBUG_ANY, "ch_malloc of %lu bytes failed\n",
38 if ( block == NULL ) {
39 return( ch_malloc( size ) );
46 if ( (new = (void *) ber_memrealloc( block, size )) == NULL ) {
47 Debug( LDAP_DEBUG_ANY, "ch_realloc of %lu bytes failed\n",
63 if ( (new = (void *) ber_memcalloc( nelem, size )) == NULL ) {
64 Debug( LDAP_DEBUG_ANY, "ch_calloc of %lu elems of %lu bytes failed\n",
65 (long) nelem, (long) size, 0 );
79 if ( (new = ber_strdup( string )) == NULL ) {
80 Debug( LDAP_DEBUG_ANY, "ch_strdup(%s) failed\n", string, 0, 0 );