]> git.sur5r.net Git - openldap/blob - libraries/libldap/strdup.c
Commit preliminary fix for ldap.conf base usage.
[openldap] / libraries / libldap / strdup.c
1 #include "portable.h"
2
3 #include <stdlib.h>
4 #include <ac/string.h>
5 #include <ac/time.h>
6
7 #include "ldap-int.h"
8
9 char *
10 (ldap_strdup)( const char *s )
11 {
12         char    *p;
13
14         if ( (p = (char *) malloc( strlen( s ) + 1 )) == NULL )
15                 return( (char *)0 );
16
17         strcpy( p, s );
18
19         return( p );
20 }