X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fch_malloc.c;h=2c7f850520d6ce03f8406d94680e1d75f3bee38f;hb=bf02252059a0b312980eec5aac33c35a4a127e21;hp=366e7bc1f17972b09ecefd3f648ce6a58c48bff5;hpb=3952bc8e95a2b21aced14f890028f12d00e191fa;p=openldap diff --git a/servers/slapd/ch_malloc.c b/servers/slapd/ch_malloc.c index 366e7bc1f1..2c7f850520 100644 --- a/servers/slapd/ch_malloc.c +++ b/servers/slapd/ch_malloc.c @@ -3,6 +3,7 @@ #include "portable.h" #include +#include #include #include @@ -60,3 +61,19 @@ ch_calloc( return( new ); } + +char * +ch_strdup( + const char *string +) +{ + char *new; + + if ( (new = strdup( string )) == NULL ) { + Debug( LDAP_DEBUG_ANY, "strdup(%s) failed\n", string, 0, 0 ); + exit( 1 ); + } + + return( new ); +} +