]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/free.c
Rework SASL command line arguments. Default is now to authenticate
[openldap] / libraries / libldap / free.c
index ba8c70902b88c10682723b88c25f09f5927691a1..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
@@ -13,9 +14,8 @@
 #include "portable.h"
 
 #include <stdio.h>
-#include <stdlib.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 );
+       }
 }