]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/free.c
moved rdn parsing in a dedicated routine, ldap_str2rdn(), that can be used directly...
[openldap] / libraries / libldap / free.c
index 99257665a4ec584f2c223273ad25482efea16af5..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,19 +37,19 @@ 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 );
 }
@@ -126,6 +126,7 @@ ldap_mods_free( LDAPMod **mods, int freemods )
                LDAP_FREE( (char *) mods[i] );
        }
 
-       if ( freemods )
+       if ( freemods ) {
                LDAP_FREE( (char *) mods );
+       }
 }