]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/free.c
Partial support for a new option to help debug TLS connections,
[openldap] / libraries / libldap / free.c
index ba8c70902b88c10682723b88c25f09f5927691a1..ae208894d018a4f3a5e3dfc6cf40c782dc11f352 100644 (file)
@@ -13,7 +13,7 @@
 #include "portable.h"
 
 #include <stdio.h>
-#include <stdlib.h>
+#include <ac/stdlib.h>
 
 #include <ac/ctype.h>
 #include <ac/string.h>
@@ -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 );
+       }
 }