X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fsort.c;h=d7ea4e434f6110fb90d95ece2a97749b1468d754;hb=df8f7cbb9b79be3be9205d116d1dd0b263d6861a;hp=36570bb1331c7ad6c9931f10e7162012a318b2a3;hpb=dc07e765f263ef459dcd2afd1ece01cfc85a0edd;p=openldap diff --git a/libraries/libldap/sort.c b/libraries/libldap/sort.c index 36570bb133..d7ea4e434f 100644 --- a/libraries/libldap/sort.c +++ b/libraries/libldap/sort.c @@ -19,7 +19,7 @@ #include "portable.h" #include -#include +#include #include #include @@ -103,7 +103,7 @@ ldap_sort_entries( return 0; } - if ( (et = (struct entrything *) malloc( count * + if ( (et = (struct entrything *) LDAP_MALLOC( count * sizeof(struct entrything) )) == NULL ) { ld->ld_errno = LDAP_NO_MEMORY; return( -1 ); @@ -118,7 +118,7 @@ ldap_sort_entries( dn = ldap_get_dn( ld, e ); et[i].et_vals = ldap_explode_dn( dn, 1 ); - free( dn ); + LDAP_FREE( dn ); } else { et[i].et_vals = ldap_get_values( ld, e, attr ); } @@ -137,7 +137,7 @@ ldap_sort_entries( ldap_value_free( et[i].et_vals ); } *ep = last; - free( (char *) et ); + LDAP_FREE( (char *) et ); return( 0 ); }