]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/free.c
Add #include <openssl/safestack.h> to fix ITS#1412
[openldap] / libraries / libldap / free.c
index 428f11f8284e8479f1a51279a995a9ae9210d10e..8d871ef241e755fb60b385f07461060997ca07d0 100644 (file)
@@ -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 <stdio.h>
 #include <ac/stdlib.h>
 
-#include <ac/ctype.h>
 #include <ac/string.h>
 #include <ac/time.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 );
+       }
 }