X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Ffree.c;h=8d871ef241e755fb60b385f07461060997ca07d0;hb=88e34546545ef8ff78a4085199e813a831a36eff;hp=428f11f8284e8479f1a51279a995a9ae9210d10e;hpb=21c70857f1029309d6bc5a5b6a93d7537494b742;p=openldap diff --git a/libraries/libldap/free.c b/libraries/libldap/free.c index 428f11f828..8d871ef241 100644 --- a/libraries/libldap/free.c +++ b/libraries/libldap/free.c @@ -1,5 +1,6 @@ +/* $OpenLDAP$ */ /* - * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ /* Portions @@ -15,7 +16,6 @@ #include #include -#include #include #include @@ -37,23 +37,29 @@ ldap_memvfree( void **v ) } void * -ldap_memalloc( size_t s ) +ldap_memalloc( ber_len_t s ) { return LDAP_MALLOC( s ); } void * -ldap_memcalloc( size_t n, size_t s ) +ldap_memcalloc( ber_len_t n, ber_len_t s ) { return LDAP_CALLOC( n, s ); } void * -ldap_memrealloc( void* p, size_t s ) +ldap_memrealloc( void* p, ber_len_t s ) { return LDAP_REALLOC( p, s ); } +char * +ldap_strdup( LDAP_CONST char *p ) +{ + return LDAP_STRDUP( p ); +} + void ldap_getfilter_free( LDAPFiltDesc *lfdp ) { @@ -120,6 +126,7 @@ ldap_mods_free( LDAPMod **mods, int freemods ) LDAP_FREE( (char *) mods[i] ); } - if ( freemods ) + if ( freemods ) { LDAP_FREE( (char *) mods ); + } }